12-01-2006 08:43 AM
12-01-2006 11:42 AM
12-05-2006 07:43 AM
What do you need from malloc.h?
The CVI ANSI C library includes the following memory management functions in stdlib.h: calloc, free, malloc, and realloc.
05-08-2007 06:41 PM
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 path (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
05-08-2007 06:48 PM
05-24-2007 08:22 AM