National Instruments NI-488.2 Refrigerator User Manual


 
Chapter 4 Developing Your NI-488.2 Application
© National Instruments Corporation 4-17 NI-488.2 User Manual
your application starts, compile and link your application as shown in the
following examples:
gcc prog.c -lgpibapi
or
g++ prog.cpp -lgpibapi
To have the library dynamically loaded on demand when your application
accesses the library, include
cib.o during the link phase of your
application, as shown in the following examples:
gcc prog.c cib.o -ldl
or
g++ prog.cpp cib.o -ldl
cib.o
is in
<InstallDir>
/natinst/ni4882/lib, where
<InstallDir>
is the directory where you chose to install the NI-488.2
software. The default is
/usr/local. The file cib.o contains code to
dynamically load the library.
The advantage of the latter way of compiling and linking your application
is that it allows your application to run regardless of whether the NI-488.2
software is installed, as long as it does not make any NI-488.2 calls.