08-12-2022 09:19 AM
Hello.
I am trying to compile this exemplary C code at the end of this page using Ubuntu 18.04: https://www.ni.com/de-de/support/documentation/supplemental/21/using-ni-daqmx-in-text-based-programm...
Unfortunately I get the following errors when I try to compile it:
voltagereader.c:(.text+0x58): undefined reference to `DAQmxCreateTask'
voltagereader.c:(.text+0xa9): undefined reference to `DAQmxCreateAIVoltageChan'
voltagereader.c:(.text+0xea): undefined reference to `DAQmxCfgSampClkTiming'
voltagereader.c:(.text+0x108): undefined reference to `DAQmxStartTask'
voltagereader.c:(.text+0x158): undefined reference to `DAQmxReadAnalogF64'
voltagereader.c:(.text+0x192): undefined reference to `DAQmxGetExtendedErrorInfo'
voltagereader.c:(.text+0x1ad): undefined reference to `DAQmxStopTask'
voltagereader.c:(.text+0x1bc): undefined reference to `DAQmxClearTask'
I have tried this solution but I was not able to find the .so file in the same location. I would really appreciate it if somebody could help me run the program.
Solved! Go to Solution.
08-13-2022 07:04 AM
Solved! I found it in this location: /usr/lib/x86_64-linux-gnu/libnidaqmx.so. Running the following command successfully compiled the program: gcc voltagereader.c /usr/lib/x86_64-linux-gnu/libnidaqmx.so -o voltagereader.