Chapter4 UsingNI-488.2withSolaris
GPIB-SCSI-Afor Solaris 4-2 ni.com
Programming Considerations
Depending on the programming language you use to develop your
application,you must include certain files, statements, or global variables
at the beginning of your application. For example, you must include the
headerfile sys/ugpib.h in you r source code if you are using C/C++.
Youmust link the language interface library with your compiled source
code. Link the GPIBC language interface library using one of the
followingcommands, where example.c is your application name:
cc example.c -lgpib
or
cc example.c -dy -lgpib
or
cc example.c -dn -lgpib
-dy specifiesdynamic link ing, which is the default method. It links the
applicationto libgpib.so.-dnspecifies static linking in the link editor.
It links the application to libgpib.a. For more information about
compiling and linking, see the man pages for cc and ld.
Forinformation about each NI-488 function and IEEE 488.2-style
function,choosing a programming method, developing your application, or
compilingand linking, refer to the NI-488.2M Software Reference Manual.
GS.book Page 2 Tuesday,June 12, 2001 2:17 PM