LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

static library linking error, undefined symbols

 

Getting undefined symbol link error with a 3rd party static library.  The .lib and .h are in the project. Library is suppose to be compiled with Visual Studio 2008 and they tell me it's pure C code and so compiled with the C compiler, not C++.  They tell me it was not compiled with any of the following switches, /J, /Zp, /Ge, /Gh, and /Gs. I just did a new install of LabWindows 2010, downloaded a couple day's ago so have the latest.  Any idea's?  I've done this before but with a much older version of LabWindows and it worked without any of these problems.

 

Thanks.

0 Kudos
Message 1 of 5
(5,595 Views)

Hello,

 

Would you mind posting a screen shot of the exact error you are seeing?

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
0 Kudos
Message 2 of 5
(5,585 Views)

Here's what I get.  The library is adapter.lib, it's header is adapter.h.  I do have adapter.h included in the .c files.  I have this project running under VS2008 and am just trying to port it over to LabWindows.  Now, my VS2008 project does have one C++ file so it is being compiled with thier C++ compiler.  That C++ file just did some network IO which I'm not doing under LabWindows. But as I said the company that supplied adapter.lib say's there is no C++ anywhere in it so I assume it should be pure C compatible.

 

I've included adapter.h also.  This .h file is the same for 32 and 64 bit windows as well as VxWorks.  I can't see anything in it that doesn't work right in this case. 

Download All
0 Kudos
Message 3 of 5
(5,581 Views)

Hello,

 

Thanks for the files.  I'm going to work to replicate this on my end and will let you know what I find!

 

Thanks!

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
0 Kudos
Message 4 of 5
(5,548 Views)

The file adapter.h doesn't define the calling convention for the functions. If you have the default calling convention set to __cdecl, try setting it to __stdcall (in Options|Build Options...).

 

--
Martin
Certified CVI Developer
0 Kudos
Message 5 of 5
(5,542 Views)