09-18-2013 08:43 AM
Hi,
How do I build a 64 bit Windows application using NI-DAQmx in Visual Studio 2010?
I'm trying to port a 32 bit application to 64 bit. In visual Studio I added the 64 bit configuration to the project. It compiled the source fine but reports link errors:
error LNK2019: unresolved external symbol DAQmxReadAnalogF64 referenced in function NI6008_AnalogInput NI_6281\NI6281.obj
error LNK2019: unresolved external symbol DAQmxCreateAIVoltageChan referenced in function NI6008_AnalogInput NI_6281\NI6281.obj
error LNK2019: unresolved external symbol DAQmxReadDigitalLines referenced in function NI6008_DigitalInput NI_6281\NI6281.obj
error LNK2019: unresolved external symbol DAQmxCreateDIChan referenced in function NI6008_DigitalInput NI_6281\NI6281.obj
error LNK2019: unresolved external symbol DAQmxWriteDigitalLines referenced in function NI6008_DigitalOutput NI_6281\NI6281.obj
error LNK2019: unresolved external symbol DAQmxCreateDOChan referenced in function NI6008_DigitalOutput NI_6281\NI6281.obj
These, of course, are the NI functions I'm using. The NIDAQmx.lib has been added to the Link Input property.
Any help would be appriciated.
Thanks,
- Neil Shore
Solved! Go to Solution.
09-19-2013 03:19 PM
Hi LaserShore,
Did you mean that you added the 64bit in the platform target settings according to this page?: http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/64bitcore/
Did you previously have 32 bit application running? Did you change the refernces to 64 bit version?
Do you use Measurement Studio? If so some features aren't supported with 64 bit.
Also when you say you added the NIDAQmx.lib, did you follow this KB:http://digital.ni.com/public.nsf/allkb/38F67B28D995C6958625706E000C580C
09-23-2013 01:22 PM
Hi Edna-S
Thanks for answering my query.
Your questions prompted me to beter check the path of the NI-DAQmx.lib file. I move the lib file into a local directory so that the build is never dependent on "vender" paths for libraries. That way, my source tree is "pure", i.e., has no dependences on other source trees.
It turned out that I had the x86 lib not the x64 lib. VS 2012 did not reject the 32 bit library for a 64 bit build. It just did not find anything in the library. That is why I was getting all the undefines. When I copied the correct NI-DAQmx.lib, everthing went fine.
I did have to search for the library. I did not find any documentation pointing me to the correct library path.
Its working now. Thanks.
- Neil Shore
09-24-2013 09:55 AM
Hi LaserShore,
Glad to hear that it is working now.
09-26-2018 08:45 PM
Hi LaserShore,I have the same problem as you.do you have 64bit NI-DAQmx.lib.I am looking forward to your help. Thank you very much. My mailbox is 745280013@qq.com
10-13-2018 04:22 AM - edited 10-13-2018 04:27 AM
Youu should find the NIDAQmx libraries and headers here:
C:\Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport
I think the subdirectories in there speak for themselves. Might be a good idea to update your NIDAQmx.h file too in your project.