Microsoft visual c/c++ (version 6.0 or later), Borland c/c++ (version 5.0.2 or later) – National Instruments NI-488.2 User Manual

Page 51

Advertising
background image

Chapter 4

Developing Your NI-488.2 Application

NI-488.2 User Manual

4-14

ni.com

Language-Specific Programming Instructions for
Windows

The following sections describe how to develop, compile, and link your
Windows NI-488.2 applications using various programming languages.

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

Before you compile your application, include the following line at the
beginning of your program:

#include "ni4882.h"

The

"NIEXTCCOMPILERSUPP"

environment variable is provided as an

alias to the location of C language support files. You can use this variable
when compiling and linking an application.

With Microsoft Visual C++ (Version 6.0 or higher), to compile and link a
Win32 console application named

cprog

in a DOS shell using the

environment variable,

"NIEXTCCOMPILERSUPP"

, type in the following on

the command line:

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

"%NIEXTCCOMPILERSUPP%\lib32\msvc\ni4882.obj" /MD

With Microsoft Visual C++ (Version 8.0 or higher), to compile and link a
Win64 console application named

cprog

in a DOS shell using the

environment variable,

"NIEXTCCOMPILERSUPP"

, type in the following on

the command line:

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

"%NIEXTCCOMPILERSUPP%\lib64\msvc\ni4882.obj" /MD

Borland C/C++ (Version 5.0.2 or Later)

Before you compile your Win32 C application, make sure that the
following line is included at the beginning of your program:

#include "ni4882.h"

The

"NIEXTCCOMPILERSUPP"

environment variable is provided as an

alias to the location of C language support files. You can use this variable
when compiling and linking an application.

Advertising