08-07-2009 11:58 AM
I was tried to use VC2008 to compile a 64bit program based on DAQmx on a 64bit Windows Vista. I used DAQmx.lib provided in the DAQmx 9.0 package located in C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev\lib\msvc. But I got a bunch of link errors:
error LNK2001: unresolved external symbol DAQmxResetDevice
error LNK2001: unresolved external symbol DAQmxClearTask
I tried to change the compilation target to 32bit and everything works. Is there any solution to help me make the program complied in 64bit?
08-11-2009 11:31 AM
Hi Fieng,
I think that DAQmx 9.0 does not support compiling for 64bit mode, and I am currently checking with R&D regarding this. I will let you know what I find.
08-12-2009 09:54 AM
Hi Fieng,
It seems that compiling for 64bit mode is supported by your version of DAQmx. Would it be possible to try compiling an NI provided example program in 64bit mode?
I did find a KnowledgeBase article here that references the error you were seeing. I'm not sure if this is relevant though, because you were able to get your code compiled in 32bit mode.
Could you please try compiling the example programs? Let me know how that goes!
11-13-2009 06:12 PM
11-16-2009 12:59 PM
Hello michael505,
Which version of NI-DAQmx are you using? DAQmx supports ANSI C native 64-bit operation since version 8.9, with .NET, C#, and LabVIEW support added in LabVIEW 8.9.5.
Please try compiling one of the examples located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\ to see if you receive the same error.
Regards,
11-16-2009 04:21 PM
11-16-2009 05:02 PM
I don't honestly know much about the Matlab toolkit that interfaces with NI-DAQmx or if it's been updated for 64-bit support. I know that we have done extensive in-house testing of DAQmx and the 64-bit functions within for both Visual Studio, CVI, and LabVIEW and haven't had any problems with 64-bit functions compiling. If the examples compile correctly in Visual Studio but won't compile in Matlab, then the issue most likely points to Matlab. What version of Matlab are you using and what version of the Matlab toolkit are you using to implement DAQmx support in Matlab?
Regards,
11-16-2009 05:21 PM
11-16-2009 07:14 PM
Ok, we solved the problem -- it was that we were using the wrong nidaqmx library file.
The correct location for 64-bit systems (on the set LIB= line in mexopts.bat for matlab users), should be C:\Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\C\lib64\msvc
We were using C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev\lib\msvc
We didn't notice this until we tried to compile the simple nidaqmx example from the command line using cl.exe and so we looked for the include directory in the simple VS 2008 example (right-click on the project -> properties -> configuration properties -> c/c++ -> general -> "additioonal include directories"
We noticed it was different from our include path and so we checked the "additional library directories" under configuration properties -> linker -> general -> "additioonal library directories" and noticed that too was different.
I must say that it would have been nicer if this info was in the manual or that the directory structure was a little easier for a human to navigate.
Thanks for your help! The most important part of troubleshooting is finding out what is NOT the problem, and we appreciate your posts.