Chapter 3
Developing Your Application
VXI/VMEpc 600 Series for Windows 95/NT
3-6
©
National Instruments Corporation
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 does not
use these symbols.
You can define the symbols using
#define
statements in the source code
or you can use either the
/D
or the
-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
VXINT
symbol is required. You must define it when using the
Microsoft C or Borland C compiler.
VXINT
designates the application as a
Windows 95/NT application.
Note
LabWindows/CVI automatically defines the correct symbol. You do not need to
define
VXINT
when using LabWindows/CVI.
The
BINARY_COMPATIBLE
symbol is optional. It makes the application
binary compatible with embedded VXI controllers, such as the National
Instruments VXI/VMEpc series of embedded controllers. This option may
cause a slight performance degradation when using 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.
For the Microsoft C compiler:
/DVXINT /DBINARY_COMPATIBLE