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

5.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.1)
  • Required system libraries
  • Essential Tools Module and DB Interface Module libraries
  • Required system libraries
  1. This option is useful when using both the DB2 CLI and MS 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 MS SQL Server.

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

where

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.

Table 1: Objects and libraries required for static builds of SourcePro DB applications with MSVC 

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
buildspace\lib\tlsbuildtag.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\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
buildspace\lib\tlsbuildtag.lib

DB Interface Module library
Essential Tools 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
buildspace\lib\tlsbuildtag.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\rwocibuildtag.obj

DB Access Module object file

buildspace\lib\ocibuildtag.lib

DB Access Module library

buildspace\lib\dbtbuildtag.lib
buildspace\lib\tlsbuildtag.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 CT Library

buildspace\lib\rwctlbuildtag.obj

DB Access Module object file

buildspace\lib\ctlbuildtag.lib

DB Access Module library

buildspace\lib\dbtbuildtag.lib
buildspace\lib\tlsbuildtag.lib

DB Interface Module library
Essential Tools 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.

Table 2: Objects and libraries required for static builds of SourcePro DB applications on UNIX 

Database Objects/Libraries Description

DB2 CLI

buildspace/lib/rwdb2buildtag.o

DB Access Module object file

-ldb2buildtag

DB Access Module library

-ldbtbuildtag
-ltlsbuildtag

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

MSSQL Server

buildspace/lib/rwmsqbuildtag.o

DB Access Module object file

-lmsqbuildtag

DB Access Module library

-ldbtbuildtag
-ltlsbuildtag

DB Interface Module library
Essential Tools 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
-ltlsbuildtag

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/rwocibuildtag.o

DB Access Module object file

-locibuildtag

DB Access Module library

-ldbtbuildtag
-ltlsbuildtag

DB Interface Module library
Essential Tools 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
-ltlsbuildtag

DB Interface Module library
Essential Tools Module library

Library vendor libraries

For example, -lct

Required system libraries

For example, -lnsl -ldl

5.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 DocumentContentsIndex pageNext file

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