LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Linker Errors With NI-IMAQdx Example Programs

The example IMAQdx projects Snap and Grab give linker errors, undefined symbols for the three imaq function calls.  Each project compiles, but will not build.

 

My own project has the same errors.

 

I am running all current copies of software downloaded recently from NI and installed in this order: CVI 2013, NI-IMAQ, and VAS(vision application software of the IMAQdx drivers for use with my Basler GIGe camera).

 

I can snap and grap images from MAX.

 

I get the same linker errors even when I add imaq.lib and imaqdx.lib in the project pane, when I add them from Edit|AddFiles or when I load them Build|Target Settings...

 

Please help,

 

Ralph Spoilsport

 

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

Did you try using the search engine on this site ?

The problem is fixed for imaqDX

See the thread here: http://forums.ni.com/t5/LabWindows-CVI/after-migrating-to-CVI-2013-could-not-get-an-exe-file/td-p/25...

Note that NI-Vision still is causing problems though.CVI2012 can find the functions defined in nivision.h, but CVI2013 cannot.

Update: even when you fix nivision.h, the examples using functions that return complex structures DO NOT WORK correctly with CVI2013. A very nasty non-obvious bug is present. Using the NI provided sample "Edge Detection.prj", found in "C:\Documents and Settings\All Users\Documents\National Instruments\CVI\Samples\Vision\2. Functions\Caliper" we find the following happens in CVI2013, but not CVI2012:

Every second point recognized has "x" and "y" coordinates swapped around.
In addition the last recognized point always has meaningless coordinates.

0 Kudos
Message 2 of 5
(4,031 Views)

Yes, I did search.  Nothing I found quite looked like this problem.

 

Copying libs around as described did me no good.

 

I was unable to modify the .h file as described (folders all the way up the tree are read-only and that seemed like a losing battle).  However, I did copy the block of #define business into the top of my .c and that fixed the linker in both NI's sample programs and my own.  It's ugly, but it's working.  I don't know how to make it elegant.

 

So, my gut is telling me this: 1) the originals were having no trouble finding the libs and that's why adding them to the project made no difference, but rather, 2) the symbols the linker did find didn't have the expected stdcall calling convention and that bit of ugly #define business cleared that up.

 

Is that roughly correct?

 

rspoilsport

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

Is your issue with IMAQdx (camera drivers) or NI-Vision (image processing & analysis)? If your problem is purely with IMAQdx, then I am surprised that the copying of libaries did not fix the problem. NI-Vision is another matter, and I am not aware of any final fix yet.

 

If you copy the nivision.h file to your project directory, you can edit it. CVI looks in the project directory first when looking for include files, and so will use this copy.

 

If you can past the exact error that you received as text, then anyone else searching for that error will find this thread.

 

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

Is your issue with IMAQdx (camera drivers) or NI-Vision (image processing & analysis)? If your problem is purely with IMAQdx, then I am surprised that the copying of libaries did not fix the problem. NI-Vision is another matter, and I am not aware of any final fix yet.

 

If you copy the nivision.h file to your project directory, you can edit it. CVI looks in the project directory first when looking for include files, and so will use this copy.

 

If you can past the exact error that you received as text, then anyone else searching for that error will find this thread.

 

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