National Instruments PC-OPDIO-16 Telescope User Manual


 
The Fundamentals of Building Applications with NI-DAQChapter 4
PC-OPDIO-16 User Manual 4-2 © National Instruments Corporation
2. Compile your source code with the Microsoft C Compiler (Version 8.0 or later) and use the
large memory model, which you select when you include the /AL flag in the command line.
For example, to compile diginout.c and its support files, use the following commands:
cl /c /AL diginout.c
cl /c /AL getdev.c
cl /c /AL errprint.c
The /c flag directs the compiler to compile only.
3. Link your object file or files (using Microsoft Overlay Linker Version 3.61 or later) with the
NIDAQMSC.LIB library to create the executable application. For example, to link the
diginout.obj, getdev.obj, and errprint.obj files produced in step 2, use the
following command:
link /SEG:250 diginout getdev errprint,,,NIDAQMSC;
This link command will produce an diginout.exe executable.
Example Programs
You can find a set of example programs and the necessary header files in the NIDAQDOS\C_EX
directory.
Creating a DOS Application Using Visual Basic
To create an application that calls NI-DAQ functions, first create a source file for your
application using the following guidelines:
1. Add the following line to the beginning of the source file:
REM $INCLUDE: 'NIDAQ.INC'
This statement declares all of the NI-DAQ functions in the NI-DAQ library.
Note: If you are using NI-DAQ memory management functions, use the include file
called NIDAQR.INC, which has less restrictive prototypes.