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 Section 4.2, "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.
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.
|
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.
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
|
-lmysql
|
Library vendor library
|
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
|
Library vendor 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
|
The requirements for building dynamically-linked SourcePro DB applications is much simpler. You need only link to the DB Interface Module library and the Essential Tools Module library, plus any required system libraries. All other linking is done dynamically at runtime.
For notes on running the resulting application, see the next section.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.