LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

use a lib file with cvi 5.5 created by visual studio

I've crated a lib files with Visual Studio, then i've copied this file in my CVI project folder and i've created an h files with the functions definition.

When i try to complile my project i've the error      Undefined symbol '_Fattoriale' referenced in "Pumpe.c".
How i can do to use this lib file?

 

Thanks

0 Kudos
Message 1 of 3
(2,933 Views)

Did you remember to use extern "C" in Visual Studio, for the name of the functions? This will prevent the C++ compiler from altering the function name ('name decoration', or 'name mangling') it uses in the resulting library. The CVI compiler (ANSI C) does not understand this process.

 

JR

0 Kudos
Message 2 of 3
(2,913 Views)

It's not enough just to put the lib in the same directory. You must also add the .lib file to your project.

 

Mert A.

National Instruments

0 Kudos
Message 3 of 3
(2,906 Views)