02-03-2015 03:20 PM
02-04-2015 12:01 AM
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)
02-04-2015 04:01 AM
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.
02-05-2015 03:48 PM
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)?:
- Kale