Instructions for Compiling SQLAPI++

Generally SQLAPI++ ships with some libraries already compiled. However we always recommend you recompile SQLAPI++ with the C++ compiler you use for your project/application. You should use appropriate batch file located in the src subdirectory of SQLAPI++ distribution (sqlapi_msvc.bat, sqlapi_bcc.bat, sqlapi_mingw.bat, sqlapi_gcc, sqlapi_ss). These files also allow to modify SQLAPI++ build options. Review the batch before you execute it - you may need to configure compiler environment and SQLAPI++ build options.

Build options should be passed with 'make' tool command line.

General build options
  • CFG - specify what type of the configuration should be build (possible values: release, debug)
  • CFG_LINK - specify the build procedure output type (possible values: dynamic, static)
  • SA_DEFINE - always use SA_NO_TRIAL to avoid trial exception and messages
  • SQLAPI_OS - should be specified for Linux/Unix platforms only (possible values: SQLAPI_LINUX(default), SQLAPI_SOLARIS, SQLAPI_AIX, SQLAPI_HPUX, SQLAPI_OSX, SQLAPI_SCOOSR5)
  • SA_64BIT - should be set if you'd like to build 64-bit SQLAPI++ binaries
  • SA_32BIT - should be set if you'd like to build 32-bit SQLAPI++ binaries

DBMS support build options
  • SA_CLIENT_ALL - build all available DBMS support
  • SA_CLIENT_IBASE - build InterBase/Firebird support
  • SA_CLIENT_ODBC - build ODBC support
  • SA_CLIENT_ORACLE - build Oracle support
  • SA_CLIENT_SQLBASE - build SQLBase support
  • SA_CLIENT_INFORMIX - build Informix support
  • SA_CLIENT_DB2 - build DB2 support
  • SA_CLIENT_SYBASE - build Sybase support
  • SA_CLIENT_MYSQL - build MySQL support
  • SA_CLIENT_PGSQL - build PostgreSQL support
  • SA_CLIENT_SQLITE - build SQLite support
  • SA_CLIENT_CUBESQL - build CubeSQL support

Disable some DBMS API support
  • SA_NO_OLEDB - disable MSSQL OLEDB client
  • SA_NO_SQLNCLI - disable MSSQL SQLNCLI client

Features build options
  • SA_UNICODE - build Unicode library version
  • SA_USE_PTHREAD - build thread safe library (with pthread library, Linux/Unix only)
  • SA_PARAM_USE_DEFAULT - specify to use default parameter values with procedures (by default they are NULL)
  • SA_STRING_EXT - use modern SAString modifications
  • SA_THROW_WRONG_DATA_EXCEPTION - throw SAException when value assigned is not correct

Code compiling build options
  • SA_USE_PCH - use precompiled headers
  • SA_INCLUDES_SYBASE - specify own Sybase ASE include folder
  • SA_CUBESQL_SRCDIR - specify folder with CubeSQL SDK sources
  • SA_RUNTIME- build the library with static or dynamic LIBC (Borland C++ and Microsoft Visual Studio only, possible values: dynamic,static)

Binaries linking build options
  • SA_STATIC_INFORMIX - link SQLAPI++ with Informix ODBC/CLI
  • SA_STATIC_DB2 - link SQLAPI++ with DB2 CLI library
  • SA_STATIC_ORACLE - link SQLAPI++ with Oracle OCI library
  • SA_STATIC_MYSQL - link SQLAPI++ with MySQL client library
  • SA_STATIC_SQLITE - link SQLAPI++ with SQLite client library
  • SA_STATIC_SYBASE - link SQLAPI++ with Sybase Open Client library
  • SA_STATIC_PGSQL - link SQLAPI++ with PostgreSQL libpq
  • SA_STATIC_CUBESQL - link SQLAPI++ with CubeSQL sources
  • SA_MANIFEST_EMB - embedded manifest (Microsoft Visual Studio only)