LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a .lib file for CVI?

I would like to create a static lib file for use in CVI.  I am trying to optimize some small functions by using inline assembly and CVI does not support inline assembly.  So I am compiling and linking using Visual studio.net.  When I run my CVI project, I receive a link error that the function name I am calling in the lib is an undefined symbol.  Does anyone have any experience with this?
0 Kudos
Message 1 of 4
(3,690 Views)
Sounds like you missed to include a .h file with function definitions, macros, prototypes and other common stuff associated with the lib file you created...


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,675 Views)
No,  CVI found the prototype for the function, it doesn't like the lib file.
0 Kudos
Message 3 of 4
(3,662 Views)

Check the discussion on name mangling by C++ compilers here.  You probably need to add extern c references to the header before compiling your code with visual c++.

http://forums.ni.com/ni/board/message?board.id=180&message.id=11323&requireLogin=False

0 Kudos
Message 4 of 4
(3,655 Views)