Chapter 4
NI-FBUS CM Software
©
National Instruments Corporation
4-13
NI-FBUS Hardware and Software User Manual
Compile, Link, and Run Your Application
To compile, link, and execute your application, you must complete the
following:
•
Add the line
#include "nifbus.h"
to any of your source files that
make NI-FBUS calls. The
nifbus.h
file is located in the
includes
subdirectory of your installation. Also, make sure that the
includes
subdirectory is included in your project’s settings.
•
Link your application with
nifb.lib
, which is located in the
MS Visual C
subdirectory of your installation.
•
Ensure that
nifb.dll
is present in your Windows directory.
nifb.dll
is an interface DLL required to interface to the NIFB
process.
nifb.dll
must be present when your application runs.
•
Ensure that the NI-FBUS Communications Manager (NIFB process)
has started and is entirely initialized before your application makes its
first NI-FBUS call.
•
Ensure your compiler has the structure padding or alignment
parameter set to eight bytes. This will allow proper communication
of data structures.
•
The
nifbus.h
header file and
nifb.lib
library have been compiled
and linked with Microsoft Visual C/C++ version 6.0 or later.
Note
NI-FBUS software supports 64-bit since version 4.0.1. To build a 64-bit application,
you must link your application with
nifb64.lib
.
nifb64.dll
should be automatically
installed in your
Windows
system directory.
Sample Programs
The NI-FBUS Communications Manager software includes four sample
programs:
nifbtest.c
,
nifb_mt.c
,
nifbdd.c
, and
nifb_list.c
.
These files provide you with some examples of NI-FBUS Communications
Manager API usage.
Because NI-FBUS uses a device description library from the F
OUNDATION
™
Fieldbus, the header files from the device description library also are part of
the NI-FBUS
includes
directory.