Compiling Your Win32 C Application

NI-488.2

Compiling Your Win32 C Application

Before you compile your Win32 C application that uses direct entry, include the following lines at the beginning of your program:

#include <windows.h>
#include "ni488.h"

When compiling and linking an application in a DOS shell, you can use the "NIEXTCCOMPILERSUPP" environment variable, which is provided as an alias to the location of C application support files.

Microsoft Visual C/C++ Programming Instructions (Version 6.0 or Later)

To compile and link a Win32 console application named cprog that uses direct entry in a DOS shell, type in the following on the command line:

cl /I"%NIEXTCCOMPILERSUPP%\include" cprog.c

Borland C/C++ Programming Instructions (Version 5.02 or Later)

To compile and link a Win32 console application named cprog that uses direct entry in a DOS shell, type in the following on the command line:

bcc32 -I"%NIEXTCCOMPILERSUPP%\include" -w32 cprog.c