The following tables list the general forms of the commands for compiling and linking Server-Library applications on Sybase-supported platforms running the UNIX operating system. The three tables include compile-and-link line commands.
Table 3-2 shows commands for compiling and linking Server-Library applications using static libraries:
Platform |
Command |
---|---|
Sun Solaris 2.x |
/opt/SUNWspro/bin/cc -I$SYBASE/include -L$SYBASE/lib program.c \ -Bstatic -lsrv [-lsybdb | -lct] -lcs -ltcl -lcomn -lintl \ -Bdynamic -lnsl -lm -o program |
IBM RS/6000 |
xlc_r4 -I$SYBASE/include -L$SYBASE/lib program.c -lsrv \ [-lsybdb| -lct] -lcs -lcomn -ltcl -lintl -lm -o program |
HP 9000(8xx) |
cc -I$SYBASE/include -L$SYBASE/lib program.c -Wl,-a,archive \ -lsrv [-lsybdb | -lct] -lcs -lcomn -ltcl -lintl -linsck \ -lcl -lm -lBSD -o program |
SGI |
cc -o [-n32 | -n64] -mips3 -I$SYBASE/include -L$SYBASE/lib \ program.c -lsrv -Bstatic [-lsybdb | -lct] \ -lcs -ltcl -lcomn -lintl -Bdynamic -lm -o progam |
HP Tru64 UNIX |
cc -I$SYBASE/$SYBASE_OCS/include program.c\ $SYBASE/$SYBASE_OCS/lib/libsrv.a \ [$SYBASE/$SYBASE_OCS/lib/libsybdb.a | $SYBASE/$SYBASE_OCS/lib/libct.a] \ $SYBASE/$SYBASE_OCS/lib/libcs.a $SYBASE/$SYBASE_OCS/lib/libtcl.a \ $SYBASE/$SYBASE_OCS/lib/libcomn.a \ $SYBASE/$SYBASE_OCS/lib/libintl.a \ -lm -o program |
Linux |
cc -I$SYBASE/$SYBASE_OCS/include-L$SYBASE/$SYBASE_OCS/lib program.c-lsrv [-lsybdb|-lct] -lcs -lsybtcl -lcomn -lintl -rdynamic -ldl -lnsl -lm -o program |
Table 3-3 shows commands for compiling and linking Server-Library applications using debug libraries:
Platform |
Command |
---|---|
Sun Solaris 2.x |
/opt/SUNWspro/bin/cc -I$SYBASE/include -L$SYBASE/devlib \ program.c -lsrv [-lsybdb | -lct] -lcs -lcomn -ltcl -lintl \ -lnsl -lm -o program |
IBM |
xlc_r4 -I$SYBASE/include -L$SYBASE/devlib program.c -lsrv \ [-lsybdb| -lct] -lcs -lcomn -ltcl -lintl -lm -o program |
HP 9000(8xx) |
cc -I$SYBASE/include -L$SYBASE/devlib program.c -lsrv \ [-lsybdb | -lct] -lcs -lcomn -ltcl -lintl -linsck \ -Wl,-a,archive -lcl -lm -lBSD -o program |
SGI |
cc [-n32 | -n64] -mips3 -I$SYBASE/include -L$SYBASE/devlib \ program.c -lsrv [-lsybdb | -lct] -lcs -ltcl -lcomn \ -lintl -lm -o program |
HP Tru64 UNIX |
cc -I$SYBASE/$SYBASE_OCS/include program.c \ -L$SYBASE/$SYBASE_OCS/devlib program.c \ -lsrv [-lsybdb | -lct] -lcs -ltcl \ -lcomn -lintl \ -lm -o program |
Linux |
cc -I$SYBASE/$SYBASE_OCS/include-L$SYBASE/$SYBASE_OCS/lib program.c-lsrv [-lsybdb|-lct] -lcs -lsybtcl -lcomn -lintl -rdynamic -ldl -lnsl -lm -o program |
Table 3-4 shows commands for compiling and linking Server-Library applications using shareable libraries (with dynamic drivers):
Platform |
Command |
---|---|
Sun Solaris 2.x |
/opt/SUNWspro/bin/cc -I$SYBASE/include -L$SYBASE/lib \ -R$SYBASE/lib program.c -lsrv [-lsybdb | -lct] -lcs -lcomn \ -ltcl -lintl -lnsl -ldl -lm -o program |
HP 9000(8xx) |
cc -I$SYBASE/include -L$SYBASE/lib program.c -lsrv \ [-lsybdb | -lct] -lcs -ltcl -lcomn -lintl -linsck \ -Wl -lcl -lm -lBSD -o program |
SGI |
cc [-n32 | -n64] -mips3 -I$SYBASE/include -L$SYBASE/lib program.c \ -lsrv [-lsybdb | -lct] -lcs -ltcl -lcomn -lintl -lm -o program |
HP Tru64 UNIX |
cc -I$SYBASE/$SYBASE_OCS/include program.c \ -L$SYBASE/$SYBASE_OCS/devlib program.c \ -lsrv [-lsybdb | -lct] -lcs -ltcl \ -lcomn -lintl \ -lm -o program |
The Open Server program can use Client-Library or DB-Library routines.
The bracketed information after -lsrv in the
above lines means that you can choose either -lsybdb for
DB-Library or -lct for Client-Library.