To build an application that uses SourcePro DB, you must link to:
Static builds | Dynamic builds |
|
|
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 5.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.
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 rwora12s.obj on Windows and rwora12s.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.
Database | Objects/Libraries | Description |
MS SQL Server | buildspace\lib\rwmsqbuildtag.obj | DB Access Module object file |
buildspace\lib\msqbuildtag.lib | DB Access Module library | |
buildspace\lib\dbtbuildtag.lib | DB Interface 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\rwmysbuildtag.obj | DB Access Module object file |
buildspace\lib\mysbuildtag.lib | DB Access Module library | |
buildspace\lib\dbtbuildtag.lib | DB Interface Module library | |
buildspace\lib\tlsbuildtag.lib | Essential Tools Module library | |
libmysql.lib | Import library for MySQL C API. | |
Required system libraries | For example, user32.lib | |
PostgreSQL | buildspace\lib\rwpgsbuildtag.obj | DB Access Module object file |
buildspace\lib\pgsbuildtag.lib | DB Access Module library | |
buildspace\lib\dbtbuildtag.lib | DB Interface Module library | |
buildspace\lib\tlsbuildtag.lib | Essential Tools Module library | |
libpqdll.lib | Import library for the libpq API supplied by PostgreSQL". | |
Required system libraries | For example, user32.lib | |
DB2 CLI | buildspace\lib\rwdb2buildtag.obj | DB Access Module object file |
buildspace\lib\db2buildtag.lib | DB Access Module library | |
buildspace\lib\dbtbuildtag.lib | DB Interface Module library | |
DB2PATH\lib\client-library-name.lib | Import library supplied by IBM for DB2 CLI; for example, db2cli.lib. (Unless "Use runtime loading of driver? = 'Yes'" was specified during buildspec creation.) | |
Required system libraries | For example, user32.lib | |
ODBC | buildspace\lib\rwodbbuildtag.obj | DB Access Module object file |
buildspace\lib\odbbuildtag.lib | DB Access Module library | |
buildspace\lib\dbtbuildtag.lib | DB Interface 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\rwocibuildtag.obj | DB Access Module object file |
buildspace\lib\ocibuildtag.lib | DB Access Module library | |
buildspace\lib\dbtbuildtag.lib | DB Interface 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 CT Library | buildspace\lib\rwctlbuildtag.obj | DB Access Module object file |
buildspace\lib\ctlbuildtag.lib | DB Access Module library | |
buildspace\lib\dbtbuildtag.lib | DB Interface Module library | |
SYBASE\lib\client-library-name.lib | Import libraries supplied by Sybase for Client-Library, including libct.lib, libcs.lib, and libblk.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.
Database | Objects/Libraries | Description |
DB2 CLI | buildspace/lib/rwdb2buildtag.o | DB Access Module object file |
-ldb2buildtag | DB Access Module library | |
-ldbtbuildtag | DB Interface 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 | |
MSSQL Server | buildspace/lib/rwmsqbuildtag.o | DB Access Module object file |
-lmsqbuildtag | DB Access Module library | |
-ldbtbuildtag | DB Interface Module library | |
Library vendor libraries | For example, -lsqlsrv | |
MySQL | buildspace/lib/rwmysbuildtag.o | DB Access Module object file |
-lmysbuildtag | DB Access Module library | |
-ldbtbuildtag | DB Interface Module library | |
-ltlsbuildtag | Essential Tools Module library | |
Library vendor library | -lmysql | |
Required system libraries | For example, -lnsl -ldl | |
ODBC | buildspace/lib/rwodbbuildtag.o | DB Access Module object file |
-lodbbuildtag | DB Access Module library | |
-ldbtbuildtag | DB Interface Module library | |
Library vendor libraries | For example, -lodbc | |
Required system libraries | For example, -lnsl -ldl | |
Oracle OCI | buildspace/lib/rwocibuildtag.o | DB Access Module object file |
-locibuildtag | DB Access Module library | |
-ldbtbuildtag | DB Interface Module library | |
Library vendor libraries | For example, -lclntsh | |
Required system libraries | For example, -lnsl -ldl | |
PostgreSQL | buildspace/lib/rwpgsbuildtag.o | DB Access Module object file |
-lpgsbuildtag | DB Access Module library | |
-ldbtbuildtag | DB Interface Module library | |
-ltlsbuildtag | Essential Tools Module library | |
Library vendor library | -lpq | |
Required system libraries | For example, -lnsl -ldl | |
Sybase CT Library | buildspace/lib/rwctlbuildtag.o | DB Access Module object file |
-lctlbuildtag | DB Access Module library | |
-ldbtbuildtag | DB Interface 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.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.