02-18-2014 03:10 PM
The linux thing is not going to be possible. DAQmx is (for the most part**) only for Windows. There is a driver called DAQmx Base that is used for Linux / OSX support and looking at the readme for 3.7 it doesn't show support for the USB-TC01.
DAQmx has the support and you will need to download the driver to get the libraries that you need (I'm assuming you haven't done this yet). Beyond that, I'm not going to be too much help for MinGW. I do know that the driver will install text-based support so hopefully you can include those drivers when you build your code.
** There is a version of DAQmx for Linux, however, it's older and doesn't include support for the USB-TC01.
02-18-2014 03:34 PM
Ah OK, so no Linux 😞
That being said, I already downloaded the driver and tried to include the nidaqmx.lib with MinGW, but I failed. Is there a visual c++ project available as sample that I can just open and compile? I tried to compile the sample files, but I always have the problems either with the nidaqmx header file or the lib... I hate windows and compilers, so hard to set up for the first time 🙂
02-18-2014 03:44 PM - edited 02-18-2014 03:47 PM
Hi DeepKling,
> Is there a visual c++ project available as sample that I can just open and compile?
Look in "C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C". Each example has a .vcproj file that should compile out of the box with Visual C++. "Analog In\Measure Slow Varying Signal\One Sample" is a good starting point.
For mingw, try something like this:
gcc OneSample.c -oOneSample.exe -I"c:\Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\C\include" -L"c:\Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\c\lib32\msvc" -lnidaqmx
One of my previous replies to this thread is about how to hack up the DAQmx C example Makefiles to build with mingw.
Brad
02-19-2014 03:16 AM - edited 02-19-2014 03:19 AM
Ah, that was exactly what I tried to do, somehow when copying your command it works 🙂 I guess the problem was that I used only the path to the lib but not to the header in the compiler flags
thank you so much 🙂