Link-and-compile lines

The following tables list the general forms of the commands for compiling and linking DB-Library applications on Sybase-supported platforms running the UNIX operating system. Table 2-2 shows the commands for compiling and linking DB-Library applications using static libraries.

Table 2-2: Static link-and-compile commands for DB-Library

Platform

Command

Sun Solaris 2.x

cc -I$SYBASE/include -L$SYBASE/lib program.c -Bstatic -lsybdb \
    -lnsl -Bdynamic -lm -o program

IBM RS/6000

xlc_r4 -I$SYBASE/include -L$SYBASE/lib program.c -lsybdb -lm \
        -o program

HP 9000(8xx)

cc -I$SYBASE/include -L$SYBASE/lib program.c -lsybdb \
    -Wl,-a,archive -lcl -lm -lBSD -o program

SGI

cc [-n32 | -n64] -mips3 -I$SYBASE/include program.c \
 	$SYBASE/lib/libsybdb.a -lm -o program

HP Tru64 UNIX

cc -I$SYBASE/include program.c \
 	$SYBASE/lib/libsybdb.a -ldnet -lm -o program

Table 2-3 shows the commands for compiling and linking DB-Library applications using debug libraries.

Table 2-3: Link-and-compile commands for DB-Library

Platform

Command

Sun Solaris 2.x

cc -I$SYBASE/include -L$SYBASE/devlib program.c -lsybdb -lnsl \
    -lm -o program

IBM RS/6000

xlc_r4 -I$SYBASE/include -L$SYBASE/devlib program.c -lsybdb -lm \
        -o program

HP 9000(8xx)

cc -I$SYBASE/include -L$SYBASE/devlib program.c -lsybdb \
    -linsck -Wl,-a, archive -lcl -lm -lBSD -o program

SGI

cc -g [-n32 | -n64] -mips3 -I$SYBASE/include -L$SYBASE/devlib \
 	program.c -lsybdb -lm -o program

HP Tru64 UNIX

cc -g -I$SYBASE/include -L$SYBASE/devlib program.c \
 	 -lsybdb -ldnet -lm -o program

Table 2-4 shows commands for compiling and linking DB-Library applications on platforms that support shareable libraries (with dynamic drivers).

Table 2-4: Shareable compile-and-link commands for DB-Library

Platform

Command

Sun Solaris 2.x

cc -I$SYBASE/include -L$SYBASE/lib -R$SYBASE/lib program.c \
    -lsybdb -lnsl -lm -o program 

HP 9000(8xx)

cc -I$SYBASE/include -L$SYBASE/lib program.c -lsybdb -Wl -lcl \
    -lm -lBSD -o program

SGI

cc [-n32 | -n64] -mips3 -I$SYBASE/include -L$SYBASE/lib \
 	program.c -lsybdb -lm -o program

Digital UNIX

cc  -I$SYBASE/include -L$SYBASE/lib \
 	program.c -lsybdb -ldnet -lm -o program

HP Tru64 UNIX

cc -I$SYBASE/$SYBASE_OCS/include -L$SYBASE/ $SYBASE_OCS/lib program.c -lsybdb -ldnet \
	-lm -o program