Hi,
I have a CVI dll (let's call it MyCVIdll) and I'm trying to use in it some functions from another dll created in Visual C++ (let's call this dll "VCdll"). I included VCdll.h in my MyCVIdll project as well as VCdll.lib. Since VCdll uses GTK and its associated glib.h, when I try to compile, CVI asks for a couple of GTK header files and I added the corresponding folders in the CVI Include Paths.
Everything goes fine and then one of this GTK headers (galloca.h) asks for malloc.h so I included also "C:\Program Files\Microsoft Visual Studio 8\VC\include" to the CVI include paths since malloc.h is there. But then I got several syntax errors in crtdefs.h (which looks like it's needed by malloc.h and is also in Visual Studio 8\VC\include).
I manually set #define _MSC_VER 1400 in MyCVIdll.h.
Does somebody know why this is happening? Should I manually add another #define somewhere? Actually this can be easily replicated in any CVI dll project, just add "C:\Program Files\Microsoft Visual Studio 8\VC\include" to the CVI include paths (options->environment->include paths), try to compile the project and you'll get several syntax errors in crtdefs.h. How to avoid those errors?
Environment: LabWindows CVI 8.1 and MS Visual Studio 2005
Thanks a lot for your help,
Delfino