LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI lib versus NIDAQmx library

Hello all,
 
I am trying to figure out how to combine Ni-DAQmx with matlab. Where I have a license for LabWindows/CVI, I want to build a so-called mex-DLL with the matlab compiler LCC. I succeeded but do not know why!
 
First I tried to build/link a NI-DAQmx application with the use of nidaqmx.h and nidaqmx.lib from the NIDAQ distribution. These files can be found in the subdirectory \Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\lib\msvc. This did not work.  I got an error that there are undefined references in the object file e.g. undefined reference to '_DAQmxReadAnalogF64@36'.
Next I used a different library from \Program Files\National Instruments\CVI80\extlib\msvc. This one did work.
 
I did not change the path for the include, but made a copy of the h-file and lib-file to the defaults for LCC.
I did change the linker-options for LCC ie added nidaqmx.lib to the list of libraries.
 
How come that the ansi-c version from the NIDAQ distribution did not work, while the CVI distribution seems to be fine ? Or: what is the difference between these two library files ?
Can I correct/adapt the NIDAQ distribution e.g. with a define or an extral include ? Or do I always need the Labwindows extlib version ?
 
Jos
 
0 Kudos
Message 1 of 2
(3,076 Views)

Hi Jos,

The extlib in CVI is for use with external compilers, this contains all symbols that any external compiler would need to resolve any function calls.

the library from the NI-DAQmx folder is optimized for use with MSVC and does not contain these simbols.

Hope this helps.

Thanks

Karsten

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