01-26-2014 02:45 PM
I have a USB-6009 device and I am running Mac OS X 10.9.1. I downloaded and installed NI-DAQmx Base 3.7.0 for Mac. I can run Isdaq.app and I see the USB device. When I try to compile the example programs according to the ReadMe.rtf that is in the documentation folder I get an error that the header file cannot be found. I do see the nidaqmxbase and nidaqmxbaselv in /Library/Framworks so I think the .dmg installed properly. Is this a problem with Mavericks? It seems simple enough.
$ cd /Applications/National Instruments/NI-DAQmx Base/examples/ai
$ make
gcc -O2 -arch i386 acquireNScans.c -framework nidaqmxbase -framework nidaqmxbaselv -o acquireNScans
acquireNScans.c:46:10: fatal error: 'nidaqmxbase/NIDAQmxBase.h' file not found
#include <nidaqmxbase/NIDAQmxBase.h>
^
1 error generated.
Thanks!
Solved! Go to Solution.
01-27-2014 05:37 PM
Hello Romp,
What program are you using to compile the example programs?
01-27-2014 05:58 PM
I am using the Makefile that comes in the example programs. Essentially gcc from the command line. My gcc is the version that comes with Xcode developer tools.
I am running the following line in the terminal.
$ gcc -O2 -arch i386 acquireNScans.c -framework nidaqmxbase -framework nidaqmxbaselv -o acquireNScans
Here's my gcc version information, which looks interesting. Maybe I should use a gcc compiler that's not from Xcode.
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
Thanks!
01-28-2014 08:00 AM
Romp94 wrote:
When I try to compile the example programs according to the ReadMe.rtf that is in the documentation folder I get an error that the header file cannot be found. I do see the nidaqmxbase and nidaqmxbaselv in /Library/Framworks so I think the .dmg installed properly. Is this a problem with Mavericks? It seems simple enough.
It's a change in the default Framework search path for Xcode 5.
Xcode 5 does not search /Library/Frameworks any longer, so you will need to add -F/Library/Frameworks to the compiler options in the Makefile to instruct the compiler to search that folder again.
My team is aware of the change and is working to accommodate the new behavior in Mavericks. For now, you'll need to update the Makefile.
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)
01-28-2014 05:01 PM
That fixed it! Compiles and runs now.
Thank you!