From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxSetChanAttribute; where to find it?

When compiling SG04 in VC6, there is a following error, how to set? Thanks.

Linking...
temp5Dlg.obj : error LNK2001: unresolved external symbol _DAQmxSetChanAttribute
0 Kudos
Message 1 of 4
(3,375 Views)
Hi mwibm,

The link error sounds like a library file is missing from your project. Make sure you've added the NIDAQmx.lib file (C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\lib\msvc) to your project and have included the header file, nidaqmx.h (C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include) in your source code files. Try one of the DAQmx examples (C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C) to see if you encounter the same error still.

Thanks,
Lesley
0 Kudos
Message 2 of 4
(3,365 Views)
Hi, Lesley,

The NI's example (ANSI C) can run without any error. But if I run my code in VC6, it has the error. I had included the *.h and *.lib. I do not know what is the real reason of the error.

Thanks.
0 Kudos
Message 3 of 4
(3,356 Views)
mwibm,

How might your code differ from the example program which acquires strain data also? Are you using "DAQmxSetChanAttribute" anywhere in your code? When you receive the error, does it tell you the line at which occurred at? "DAQmxSetChanAttribute" is not a DAQmx function defined in the Reference. Try using the example code as a starting point.

Thanks,
Lesley
0 Kudos
Message 4 of 4
(3,348 Views)