Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Conflicts when using both NIDAQmxBase and NIDAQmx

We have two PCI-4461 boards and one USB-6501 all in the same PC, running Cent OS 6.2.  The 4461 boards require use of the NIDAQmx 8.0.2 drivers, while the 6501 device requires NIDAQmxBase 3.6.0.  I'm trying to control all of the devices from the same program.  However, I get the conflicts listed below when my program ultimately includes both NIDAQmx.h and NIDAQmxBase.h.  This seems to imply that there is no way to control a 4461 and a 6501 from the same program.  Is that correct, or is there a way around the conflicts?

========= Compilation Errors =============

In file included from /home/iwats/dev/iwats/src/c/sp/DioMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:56,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmxbase/include/NIDAQmxBase.h:19:1: warning: "__CFUNC" redefined

In file included from /home/iwats/dev/iwats/src/c/sp/AdcMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/DataAcq.h:24,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:32,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmx/include/NIDAQmx.h:20:1: warning: this is the location of the previous definition

In file included from /home/iwats/dev/iwats/src/c/sp/DioMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:56,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmxbase/include/NIDAQmxBase.h:20:1: warning: "__CFUNC_C" redefined

In file included from /home/iwats/dev/iwats/src/c/sp/AdcMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/DataAcq.h:24,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:32,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmx/include/NIDAQmx.h:21:1: warning: this is the location of the previous definition

In file included from /home/iwats/dev/iwats/src/c/sp/DioMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:56,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmxbase/include/NIDAQmxBase.h:21:1: warning: "__CFUNCPTRVAR" redefined

In file included from /home/iwats/dev/iwats/src/c/sp/AdcMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/DataAcq.h:24,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:32,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmx/include/NIDAQmx.h:22:1: warning: this is the location of the previous definition

In file included from /home/iwats/dev/iwats/src/c/sp/DioMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:56,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmxbase/include/NIDAQmxBase.h:2962:1: warning: "DAQmxFailed" redefined

In file included from /home/iwats/dev/iwats/src/c/sp/AdcMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/DataAcq.h:24,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:32,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmx/include/NIDAQmx.h:4422:1: warning: this is the location of the previous definition

In file included from /home/iwats/dev/iwats/src/c/sp/DioMgr.h:25,

                 from /home/iwats/dev/iwats/src/c/sp/Iwats.h:56,

                 from /home/iwats/dev/iwats/src/c/sp/iwatsMain.cpp:20:

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmxbase/include/NIDAQmxBase.h:88: error: conflicting declaration ‘typedef uInt32* TaskHandle’

/home/iwats/dev/iwats/resources/drivers/natinst/nidaqmx/include/NIDAQmx.h:90: error: ‘TaskHandle’ has a previous declaration as ‘typedef uInt32 TaskHandle’

gmake: *** [iwatsMain.o] Error 1

0 Kudos
Message 1 of 2
(3,559 Views)

Hi Kevin,

Some of those messages are warnings about redefinitions of preprocessor macros. The messages about __CFUNC, __CFUNC_C, __CFUNCPTRVAR, and DAQmxFailed aren't fatal since they have the same definition.

The message about TaskHandle is a problem. There is a fundamental incompatibility between these types in DAQmx and DAQmx Base -- you can't use a DAQmx TaskHandle with DAQmx Base, and vice versa. One is a uInt32 and the other is a uInt32*.

One way to work around the problem, though, is to use them from different object files. Another way is to wrap one with another type. The DAQmx Base API is much smaller and would probably be the better/easier candidate.

I've noted this in the DAQmx Base bug list, and we'll work on a longer-term resolution.

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 2
(2,734 Views)