Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I build a 64 bit Windows application using NI-DAQmx in Visual Studio 2010

Solved!
Go to solution

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

 

0 Kudos
Message 1 of 6
(8,764 Views)
Solution
Accepted by topic author LaserShore

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

National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(8,745 Views)

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

 

0 Kudos
Message 3 of 6
(8,722 Views)

Hi LaserShore,

 

Glad to hear that it is working now.

National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(8,712 Views)

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

0 Kudos
Message 5 of 6
(3,795 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(3,747 Views)