12-06-2005 09:16 AM
12-19-2005
12:28 PM
- last edited on
05-29-2025
03:08 PM
by
Content Cleaner
Hello kubilus1,
The NI-DAQmx Version 8.0 for Linux driver was released recently. I would reccomend trying this new driver and seeing if you get the same behavior.
12-19-2005 02:22 PM
12-20-2005 10:32 AM
Hi,
The README for DAQmx 8.0 for Linux has some information on pthread:
Linking with the pthread Library
--------------------------------
In C or C++, use care if your NI-DAQmx application links to the Linux pthread
library. It is recommended to link your application with the gcc -pthread flag
instead of linking directly with, for instance, -lpthread. Incorrect linking
can lead to segmentation faults when the NI-DAQmx libraries load. If, after
replacing -lpthread, you still get a segmentation fault when loading NI-DAQmx,
you must explicitly link the dl library (-ldl) as the first library in your
list.
Also, one of my colleagues suggested that you should be using fork as soon as possible before calling any NI API or
else the child process could potentially die/segfault.
Please let me know if this helps.
Thanks,
Salvador Santolucito
04-11-2006 11:52 PM
For the fork() issue, if you use
DAQmxErrChk (DAQmxTaskControl(<your task handle>,DAQmx_Val_Task_Unreserve));
after each run of the task, it should solve your problems. It's annoying, but it works for me.