Using Your NI-488.2M Software
Chapter 5
PCI-GPIB for Digital UNIX
5-2
© National Instruments Corp.
a.
If you want to use the sha red library
/usr/shlib/libgpib.so
, enter the following command:
cc test.c -o test -no_archive -lgpib
The
-no_archive
option is positional and can be used more than
once. It affects only those options that follow it.
b.
If you want to use the non-shared library
/usr/lib/libgpib.a
, enter the following command:
cc test.c -o test -non_shared -lgpib
c.
Optionally, you can enter the command without specifying the
no_archive
or
non_shared
flag as follows:
cc test.c -o test -lgpib
In this case, the compiler, by default, first tries to use the shared
library. If that library is not available, it tries to link to the non-
shared library.
For more detailed information about compiling, refer to the
man
pages
on
cc
and
ld
.
3.
Run the program by entering the following command:
test
For detailed information about each NI-488 function and NI-488.2 routine,
refer to the NI-488.2M Software Reference Manual.