Solution
Using a 32-bit library file in a 64-bit program can cause linking errors. If your program works as a 32-bit application then the linking errors are most likely caused by linking to a 32-bit .lib file.
To resolve the linking errors, replace the references to 32 bit directory with reference to the 64 bit directory for NI-DAQmx.
The 64-bit NI-DAQmx C Lib File Location is:
<Program Files (x86)>\National Instruments\Shared\ExternalCompilerSupport\C\lib64\msvc
This is a native 64-bit library file and can be used in 64-bit C and C++ applications.