Programming Considerations - National Instruments SB-GPIB Getting Started

Controller board and software for solaris
Table of Contents

Advertisement

Chapter 4
Using NI-488.2 with Solaris

Programming Considerations

SB-GPIB/TNT for Solaris
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
header file
sys/ugpib.h
You must link the language interface library with your compiled source
code. Link the GPIB C language interface library using one of the
following commands, where
cc example.c -lgpib
or
cc example.c -dy -lgpib
or
cc example.c -dn -lgpib
specifies dynamic linking, which is the default method. It links the
-dy
application to
libgpib.so
It links the application to
compiling and linking, see the
For information about each NI-488 function and IEEE 488.2-style
function, choosing a programming method, developing your application, or
compiling and linking, refer to the NI-488.2M Software Reference Manual.
in your source code if you are using C/C++.
is your application name:
example.c
.
specifies static linking in the link editor.
-dn
. For more information about
libgpib.a
pages for
man
4-2
and
.
cc
ld
ni.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sb-gpib/tntNi-488.2

Table of Contents