Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

MinGW on Windows 7 64bit and DAQmx 9.1.7

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.

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 11 of 14
(1,142 Views)

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 🙂

0 Kudos
Message 12 of 14
(1,135 Views)

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

---
Brad Keryan
NI R&D
0 Kudos
Message 13 of 14
(1,132 Views)

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 🙂

0 Kudos
Message 14 of 14
(1,113 Views)