LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Works in 2009, Link errors in 2013 SP1

   I have a system that runs rack mount test instruments.  I have a system DLL that performs different generic  functions for me and also included custom driver functions for the instrumentation.  This DLL is built and the different driver .h/.fp files and the system DLL library file are distributed.  The distributed files are included in various test projects.   

   This approach has worked for the last 2 years using CVI2009.  I recently started trying to use CVI2013 SP1.  The system DLL still builds with no errors.  However, my various test DLL that use the distributed files, now compile fine, but have Undefined symbol link errors.  The link errors point to functions and structures that are global to the system DLL, but weren't meant for exported use by the test DLLs.  The files the link errors call out are .obj files for a couple of different system drivers that are located in the build folder that CVI created.  Anyone experienced anything like this while upgrading to CVI2013?

0 Kudos
Message 1 of 5
(4,879 Views)

Hello HeadTrauma, 

 

I think it might be worth checking that you have your library set to a dynamically linked library.  The behavior you are receiving seems akin to changing a dynamically linked library to a statically linked library.  This could happen automatically in an upgrade.  For information on how to set this, please view the following link: 

 

http://digital.ni.com/public.nsf/allkb/BF8084DB74021EE986257AB200001737

 

Best wishes!

Amanda B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(4,816 Views)

I'm having these same symptoms.  

 

Recently upgraded from 2014 to 2015.  My DLL project was compiling fine prior to upgrade.  Now when I build it, the test program that uses the built DLL reports 

 

 

 

error: '_gPOPUPS' was specified as an export, but is not defined. 

error: Undefined symbol '_gPOPUPS' referenced in "c:\Test Projects\LabWindows\cvibuild.test\Debug\test.obj".  

 

The linked article above doesn't work for me.  I also double-checked that my DLL header is exporting all symbols.  Strange.

0 Kudos
Message 3 of 5
(3,867 Views)

Never mind, I resolved this.  I'm not clear why the calling convention needed to change in 2015, but here is how I resolved:

 

DLL project

 

dll_c_file.h

 

DLLEXPORT int gPOPUPS; // set this variable to 1 to get popup messages 

 

test project

 

 

gPOPUPS = 1;

 

My issue was that I had an extern on my DLLEXPORT declaration.  I have found that in my test project, I don't even need to declare this global with a DLLIMPORT.

 

 

0 Kudos
Message 4 of 5
(3,839 Views)

Actually, my previous post isn't quite right. See here...

0 Kudos
Message 5 of 5
(3,654 Views)