
Chapter 3
Developing Your Application
©
National Instruments Corporation
3-5
Compiler Symbols for NI-VXI
You may need to define some symbols so that the NI-VXI library can work
properly with your program.
Note
Skip this section if you are programming with NI-VISA only. NI-VISA neither
requires nor uses these symbols.
You can define the symbols using
#define
statements in the source
code or you can use either the
/D
or
-D
option in your compiler (both the
Microsoft and Borland compilers support the
/D
and
-D
options). If you use
#define
statements, you must define the symbols before including the
NI-VXI header file
nivxi.h
. If you use the makefiles to compile the
sample program, the makefile already defines the necessary symbols.
The following symbol is usually required. You must define it when using
the Microsoft C or Borland C compiler.
•
VXINT
designates the application as a Windows 2000/NT/Me/98
application.
Note
LabWindows/CVI automatically defines the correct symbol. You do not need to
define
VXINT
when using LabWindows/CVI.
The
BINARY_COMPATIBLE
is optional. This symbol makes the application
binary compatible with embedded VXI controllers, such as the National
Instruments VXIpc series of embedded controllers. This option may cause
a slight performance degradation when you use low-level VXIbus access
functions.
If you define these symbols in your source code, your source code should
look something like the following sample code:
#define VXINT
#define BINARY_COMPATIBLE
.
.
.
#include <nivxi.h>
If you define these symbols using the
/D
or
-D
compiler options,
you should specify the following when invoking the compiler.