Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What do I need to link to gpib-32.obj in MinGW?

I want to link to ..\National Instruments\Shared\ExternalCompilerSupport\C\lib32\msvc\gpib-32.obj using MinGW. I used the new GPIB header and I made a import library (lib<name>.a) using pexports ("pexports gpib-32.dll > gpib-32.dll"). But when I try to compile, I get these errors:

 

..: undefined reference to `ThreadIberr@0'
..: undefined reference to `ThreadIbsta@0'
..: undefined reference to `ibeos@8'
..: undefined reference to `ibeot@8'
..: undefined reference to `ibtmo@8'
..: undefined reference to `ibsad@8'
..: undefined reference to `ibpad@8'
..: undefined reference to `ibonl@8'
..: undefined reference to `ibwrt@12'
..: undefined reference to `ibrd@12'
..: undefined reference to `ThreadIbcntl@0'
..: undefined reference to `ibwrt@12'
..: undefined reference to `ibwrt@12'
..: undefined reference to `ibrd@12'
..: undefined reference to `ThreadIbcntl@0'
..: undefined reference to `ibrd@12'
..: undefined reference to `ibonl@8'
..: undefined reference to `ibdev@24'
..: undefined reference to `ibclr@4'
..: undefined reference to `ibonl@8'
..: undefined reference to `ibfindA@4'
..: undefined reference to `ibpad@8'
..: undefined reference to `ibsad@8'
..: undefined reference to `ibtmo@8'
..: undefined reference to `ibeot@8'
..: undefined reference to `ibeos@8'
collect2: ld returned 1 exit status

 

I think this is similar to http://forums.ni.com/t5/Multifunction-DAQ/Howto-use-NIDAQmx-with-mingw-gcc-3-4-2/m-p/294361, where the exports of nidaq32.dll (NI-DAQmx library) need to be first merged with the nicaiu.dll exports in order to create libnidaqmx.a. This can then be compiled in MinGW.

0 Kudos
Message 1 of 3
(3,993 Views)

what language are you compiling this in?

0 Kudos
Message 2 of 3
(3,927 Views)

It's C++ compiled with g++. The tooling & commands that I use to make the lib are:

 

pexports gpib-32.dll > gpib-32.defs

dlltool -k -d gpib-32.defs -l libgpib.a GPIB.DLL

 

The link above doesn't work. Use this link instead:

 

http://forums.ni.com/t5/Multifunction-DAQ/Howto-use-NIDAQmx-with-mingw-gcc-3-4-2/m-p/294361

0 Kudos
Message 3 of 3
(3,921 Views)