Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave Component Builder (RCB): Building Your Applications
Rogue Wave web site:  Home Page  |  Main Documentation Page

4.1 Required Link Libraries

To build an application that uses SourcePro DB, you must link to:

Static builds Dynamic builds
  • Essential Tools Module and DB Interface Module libraries

  • The DB Access Module library for your database

  • An object file associated with the access module

  • The import library provided by the database vendor (unless you specified "yes" for "Use runtime loading of driver" during the buildspec creation.)

  • Required system libraries

  • Essential Tools Module and DB Interface Module libraries

  • Required system libraries

1This option is useful when using both the DB2 CLI and Microsoft SQL Server Access Modules in the same, statically linked, application. For more information about this option, see the Access Module User's Guide for DB2CLI and Microsoft SQL Server.

4.1.1 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 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.

The object files follow this naming convention:

where

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.
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.


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
-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

4.1.2 Dynamically-linked Applications

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.



Previous fileTop of DocumentContentsNo linkNext file

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.