Statically-linked Applications
For summary tables of linking requirements for statically-linked applications, see Table 1 (Windows) and Table 2 (UNIX) below. For notes on running the resulting application, see Runtime Issues.
When building a statically-linked DB Interface Module application, you must link to a database-specific object file. The object file is in charge of notifying the RWDBManager object that the access module must be reached through a static link rather than through runtime binding.
The object files follow this naming convention:
 
rw<product-mnemonic><buildtag>.<extension>
where
*<product-mnemonic> is the three-letter mnemonic for the access library
*<buildtag> is the build tag assigned by RCB when the access module library was built, which depends on the naming convention you chose
*<extension> is the operating system object file extension, either .o for UNIX systems or .obj for Windows
For the Oracle access module library built in the 12s configuration, the object file would be named rwoci12s.obj on Windows and rwoci12s.o on UNIX.
Table 1 summarizes the libraries and object files you must link to on Windows using MSVC. After Table 1, Table 2 shows UNIX requirements.
Table 1 – Objects and libraries required for static builds of SourcePro DB applications with MSVC 
Database
Objects/Libraries
Description
Microsoft SQL Server
buildspace\lib\rwmsq<buildtag>.obj
DB Access Module object file
buildspace\lib\msq<buildtag>.lib
DB Access Module library
buildspace\lib\dbt<buildtag>.lib
buildspace\lib\tls<buildtag>.lib
DB Interface Module library Essential Tools Module library
odbc32.lib
Import library supplied by Microsoft. (Unless “Use runtime loading of driver? = ’Yes’” was specified during buildspec creation.)
Required system libraries
For example, user32.lib
MySQL
buildspace\lib\rwmys<buildtag>.obj
DB Access Module object file
buildspace\lib\mys<buildtag>.lib
DB Access Module library
buildspace\lib\dbt<buildtag>.lib
DB Interface Module library
buildspace\lib\tls<buildtag>.lib
Essential Tools Module library
libmysql.lib
Import library for MySQL C API
libmariadb.lib
Import library for MariaDB.
(Use the import library for MySQL as above, or MariaDB, depending on your underlying library.)
Required system libraries
For example, user32.lib
PostgreSQL
buildspace\lib\rwpgs<buildtag>.obj
DB Access Module object file
buildspace\lib\pgs<buildtag>.lib
DB Access Module library
buildspace\lib\dbt<buildtag>.lib
DB Interface Module library
buildspace\lib\tls<buildtag>.lib
Essential Tools Module library
libpq.lib
Import library for the libpq API supplied by PostgreSQL
Required system libraries
For example, user32.lib
DB2 CLI
buildspace\lib\rwdb2<buildtag>.obj
DB Access Module object file
buildspace\lib\db2<buildtag>.lib
DB Access Module library
buildspace\lib\dbt<buildtag>.lib
buildspace\lib\tls<buildtag>.lib
DB Interface Module library Essential Tools Module library
DB2PATH\lib\db2cli.lib
Import library supplied by IBM for DB2 CLI. (Unless “Use runtime loading of driver? = ’Yes’” was specified during buildspec creation.)
Required system libraries
For example, user32.lib
ODBC
buildspace\lib\rwodb<buildtag>.obj
DB Access Module object file
buildspace\lib\odb<buildtag>.lib
DB Access Module library
buildspace\lib\dbt<buildtag>.lib
buildspace\lib\tls<buildtag>.lib
DB Interface Module library Essential Tools Module library
ODBC\lib\client-library-name.lib
Import library supplied by Microsoft or ODBC driver vendor; for example, odbc32.lib.
Required system libraries
For example, user32.lib
Oracle OCI
buildspace\lib\rwoci<buildtag>.obj
DB Access Module object file
buildspace\lib\oci<buildtag>.lib
DB Access Module library
buildspace\lib\dbt<buildtag>.lib
buildspace\lib\tls<buildtag>.lib
DB Interface Module library Essential Tools Module library
ORACLE\oci\lib\msvc\oci.lib
Import library supplied by Oracle for Oracle OCI library.
Required system libraries
For example, user32.lib
Sybase
buildspace\lib\rwctl<buildtag>.obj
DB Access Module object file
buildspace\lib\ctl<buildtag>.lib
DB Access Module library
buildspace\lib\dbt<buildtag>.lib
buildspace\lib\tls<buildtag>.lib
DB Interface Module library Essential Tools Module library
SYBASE\lib\client-library-name.lib
Import libraries supplied by Sybase for Open Client Client-Library, including libsybct.lib, libsybcs.lib, and libsybblk.lib.
Required system libraries
For example, user32.lib
Table 2 summarizes the libraries and objects you must link to on UNIX platforms. The library links use the -llibrary-name convention, which assumes that you have set the path to the library directories with the -L flag.
NOTE: On UNIX, link order is significant. Link the objects and libraries in the order listed in the table.
Table 2 – Objects and libraries required for static builds of SourcePro DB applications on UNIX 
Database
Objects/Libraries
Description
DB2 CLI
buildspace/lib/rwdb2<buildtag>.o
DB Access Module object file
-ldb2<buildtag>
DB Access Module library
-ldbt<buildtag>
-ltls<buildtag>
DB Interface Module library
Essential Tools Module library
Library vendor libraries
For example, -ldb2 (Unless “Use runtime loading of driver? = ’Yes’” was specified during buildspec creation.)
Required system libraries
For example, -lnsl -ldl
MySQL
buildspace/lib/rwmys<buildtag>.o
DB Access Module object file
-lmys<buildtag>
DB Access Module library
-ldbt<buildtag>
DB Interface Module library
-ltls<buildtag>
Essential Tools Module library
-lmysqlclient
MySQL vendor library
-lmariadb
MariaDB vendor library
(Use the vendor library for either MySQL or MariaDB, but not both.)
Required system libraries
For example, -lnsl -ldl
MS SQL
buildspace/lib/rwodb<buildtag>.o
DB Access Module object file
-lodb<buildtag>
DB Access Module library
-ldbt<buildtag>
-ltls<buildtag>
DB Interface Module library
Essential Tools Module library
Library vendor libraries
For example, -lodbc
Required system libraries
For example, -lnsl -ldl
ODBC
buildspace/lib/rwodb<buildtag>.o
DB Access Module object file
-lodb<buildtag>
DB Access Module library
-ldbt<buildtag>
-ltls<buildtag>
DB Interface Module library
Essential Tools Module library
Library vendor libraries
For example, -lodbc
Required system libraries
For example, -lnsl -ldl
Oracle OCI
buildspace/lib/rwoci<buildtag>.o
DB Access Module object file
-loci<buildtag>
DB Access Module library
-ldbt<buildtag>
-ltls<buildtag>
DB Interface Module library
Essential Tools Module library
Library vendor libraries
For example, -lclntsh
Required system libraries
For example, -lnsl -ldl
PostgreSQL
buildspace/lib/rwpgs<buildtag>.o
DB Access Module object file
-lpgs<buildtag>
DB Access Module library
-ldbt<buildtag>
DB Interface Module library
-ltls<buildtag>
Essential Tools Module library
-lpq
Postgres vendor client library
Required system libraries
For example, -lnsl -ldl
Sybase
buildspace/lib/rwctl<buildtag>.o
DB Access Module object file
-lctl<buildtag>
DB Access Module library
-ldbt<buildtag>
-ltls<buildtag>
DB Interface Module library
Essential Tools Module library
Library vendor libraries
For example, -lct
Required system libraries
For example, -lnsl -ldl