07-19-2023 03:06 PM
Hello all,
This might be a stupid question, but I cannot find the document where it introduces me how to correctly set the programming environment in Visual Studio 2022.
I have tried to manually include NIDAQmx.h in the additional include of my project. I have also added NIDAQmx.lib into additional library dependencies. However, my VS still showed me a LNK 2019 error when I try to include NIDAQmx.h. Currently, I can only find the NIDAQmx.h and NIDAQmx.lib in "C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev", and these are the only two files there. Can someone point me to the section that I can find how to set up the programming environment, or to tell me what and where are all dependencies and includes I need to add to the VS project.
Thanks for the help in advance.
Solved! Go to Solution.
07-19-2023 03:09 PM
BTW, in case you need to know, I have a USB6210 Multifunction I/O, and NI-DAQmx version 2023 Q3 installed
07-19-2023 03:17 PM
There are shipping examples with vsproj that you can refer to:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C
You need to include libraries from these directories as well:
$(ProgramFiles)\National Instruments\Shared\ExternalCompilerSupport\C\include
$(ProgramFiles)\National Instruments\Shared\ExternalCompilerSupport\C\lib32\msvc
07-19-2023 04:35 PM
Thanks for your help. I have to change to directory location to Program Files(x86), other than that, it seems to be working correctly.