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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

where can i find ni4882.h for gcc compiler?

I have c code compiled on MS visual Studio 2010. Now I need to recompile same code with gcc. But I think ni4882.h is not being linked correctly. Where can I find ni4882.h for gcc compiler? I am using MingW on my windows 8 PC.
0 Kudos
Message 1 of 4
(4,687 Views)

Why do you think, that ni4882.h isn't linked correctly ? Are there error messages ?

Correcly spoken ni4882.h  isn't linked. The header file is included by the preprocessor into the source code before running the compiler.

And later the library ( .lib file ) is linked  to the objectcode generated by the compiler. But you will usually need to specify on the compiler command line which library needs to be linked . And maybe also where to find the library ( IIRC gcc uses the -l and -L switches for that purpose)

 

0 Kudos
Message 2 of 4
(4,668 Views)

I am getting errors like these:

 undefined reference to `SendIFC@4'
 undefined reference to `Ibsta@0'
 undefined reference to `FindLstn@16'
 undefined reference to `Ibsta@0'
 undefined reference to `Ibcnt@0'
 undefined reference to `DevClearList@8'
 undefined reference to `Ibsta@0'
 undefined reference to `SendList@20'
 undefined reference to `Ibsta@0'
 undefined reference to `Receive@20'
 undefined reference to `Ibsta@0'
 undefined reference to `Ibcnt@0'

...

...

 

Can you suggest what should be right approach to compile my c code with gcc?i thought i need right ni4882.h for gcc compiler.

 

 

0 Kudos
Message 3 of 4
(4,659 Views)

Hi,

 

I found some older forum posts that I think might be of interest. I hope it helps.

 

How Can I Use The NI-DAQmx ANSI C Function Library With GCC (on Windows)?:

http://forums.ni.com/t5/Multifunction-DAQ/How-Can-I-Use-The-NI-DAQmx-ANSI-C-Function-Library-With-GC...

 

- Kale

Message 4 of 4
(4,624 Views)