LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Partially working dll

I am trying to interface a PCI LIN Interface Card to LabWindows/CVI.

The Card supplier provided us with a DLL together with a .h and a .lib for Microsoft Visual

C++ 6, namely vxlapi.h, vxlapi.lib and vxlapi.dll.

A working example for Visual C++ was also supplied and works.


I have used the .h and .lib in my CVI project and built it.
However, the complier is giving link problems on some of the functions.


On building, the complier is giving the following error:
---------------------------------------------------------------
1 Project link error
Undefined symbol ' xlOpenPort@28' referenced in "lin.c"
---------------------------------------------------------------

I am using other functions from the DLL however, the compil
er is just complaining on xlOpenPort().


I have included my code. Can anyone please help me sort this problem out? Thanks
0 Kudos
Message 1 of 2
(3,552 Views)
Hi Raphael,

I'm not sure why (might be some odd rule with the compiler or linker), but if you go to the top of your lin.c file, you should see the workaround added by David for CVI. There should be a #define __int64 int and #include "cvidef.h". If you move the #define to go after all of the includes, (i.e., insert after line '#include "lin.h"') it will link fine and work. I'm curious as to why this is the reason for the bad link error.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 2
(3,552 Views)