IBM Webcam 4J ユーザーズマニュアル

ページ / 98
Chapter 4. Writing Custom Programs
Introduction to Writing Custom Programs
The Sterling Connect:Direct Application Programming Interface (API) allows you
to write custom programs in either C or C++ to use with Sterling Connect:Direct.
With the C functions or the C++ classes, you can create programs to perform the
following tasks:
v
Establish a connection to the Sterling Connect:Direct server
v
Disconnect from the server
v
Receive command responses from the server
v
Send commands to the server
This topic describes the format of the Sterling Connect:Direct API functions and
classes and provides samples of their use. Sample programs are provided that use
the Sterling Connect:Direct API functions and classes to issue commands and
receive responses from the Sterling Connect:Direct server.
Compiling Custom Programs
After you write a custom program, you must compile it, using a C or C++
compiler. Refer to the following information to determine what minimum C++
compiler version to use for each platform:
Platform
C++ Compiler
AIX
IBM XL C++ V8.0 for AIX
Sun Solaris
SPARC/x86 C++5.7
HP
aCC: HP ANSI C++ B3910B A.03.73
HP-Itanium
aCC: HP ANSI C++ B3910B A.06.07
Linux
c++ version 3.3.3
Use the commands defined in the following table to compile a custom C++
program using the C++ API calls:
Platform C++ Compile Command
AIX
64-bit
/usr/vacpp/bin/xlC -q64 -qinline -I../include -+ -o sdksample sdksample.C ../lib/ndmapi64.a -lbsd -ldl
-lsrc -lpthreads
32-bit
/usr/vacpp/bin/xlC -qinline -I../include -+ -o sdksample sdksample.C ../lib/ndmapi.a -lbsd -ldl -lsrc
-lpthreads
Sun
32-bit
/opt/SUNWspro/bin/CC -DBSD_COMP -I../include -o sdksample sdksample.C ../lib/ndmapi.a
-L/usr/ucblib -L/usr/lib -lsocket -lrpcsoc -lnsl -lelf -ldl
Note:
If /usr/ucblib is not in the LD_LIBRARY_PATH variable, add -R/usr/ucblib to the compile
command.
© Copyright IBM Corp. 1999, 2013
59