10-10-2007 02:50 AM
10-11-2007 03:48 PM
Hi Haider:
What I’m going to point you to is to the “ANSI C” examples that are install with the NI-DAQmx drivers. Location of ANSI C NI-DAQmx Shipping Examples and DAQmx Library File is the knowledge base in case you can’t find them; take a closer look at "Acq-IntClk.c" it might be what you are looking for. Make sure you have a space between include and the <library> since you just wrote include<library> I don’t remember if “Turbo C” highlights the text for syntaz errors. But you are correct, the only thing you need to include in you code is: #include <NIDAQmx.h>,
10-12-2007 09:56 AM
10-15-2007 02:00 PM
Hi Haider,
Since you are using NI DAQmx 8.6 which is the most current version of the driver, you should not have a compatibility problem with Turbo C/C++. As Jaime mentioned, you should use the line #include <NIDAQmx.h>. However, to make sure that you are accessing the correct header file, try including the direct path to the file. On my computer, I would include the following:
#include <”C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h”>
Jaime also suggested using the example programs that come with the ANSI C environment and DAQmx. If you can run the example with the DAQmx include statement, we will know that there is a syntax error in the way you are adding your header files. From there, you can copy over the exact syntax used in the example into your own program.
Redefinition errors sometimes occur due to defining functions more than once. The header file includes function definitions. Therefore, if you are defining a function in your program with a similar name to one in the header file, these errors could occur. Please let me know if these suggestions help!
10-17-2007 01:57 AM
10-18-2007 11:45 AM
10-19-2007 02:03 AM