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 on the 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 messagesSQLAPI_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++ binariesSA_32BIT- should be set if you'd like to build 32-bit SQLAPI++ binariesSA_BUILD_OPTIONS- can be used for defineing another build options in a separate file. There is also sample SQLAPI/src/BUILD_OPTIONS.Makefile with all possible options decribed.
DBMS support build options
SA_CLIENT_ALL- build all available DBMS supportSA_CLIENT_IBASE- build InterBase/Firebird supportSA_CLIENT_ODBC- build ODBC supportSA_CLIENT_ORACLE- build Oracle supportSA_CLIENT_INFORMIX- build Informix supportSA_CLIENT_DB2- build DB2 supportSA_CLIENT_SYBASE- build Sybase supportSA_CLIENT_SQLBASE- build SQLBase supportSA_CLIENT_MYSQL- build MySQL supportSA_CLIENT_MARIADB- build MariaDB supportSA_CLIENT_PGSQL- build PostgreSQL supportSA_CLIENT_SQLITE- build SQLite supportSA_CLIENT_CUBESQL- build CubeSQL supportSA_CLIENT_DUCKDB- build DuckDB supportSA_CLIENT_OLEDB- build OLEDB support
Disable some DBMS API support
SA_NO_OLEDB- disable MSSQL OLEDB clientSA_NO_SQLNCLI- "disable MSSQL SQLNCLI client
Features build options
SA_UNICODE- "build Unicode library versionSA_USE_PTHREAD- build thread safe library (with pthread library, Linux/Unix only)SA_DISABLE_ATOMIC_HEADER- Disable <atomic> header using for the thread safe SAString data (Linux/Unix only, <atomic> used with C++11 and above).SA_USE_PTHREAD_FOR_ATOMIC- Use SAMutex (pthread based) instead of <atomic> for the thread safe SAString data (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 modificationsSA_THROW_WRONG_DATA_EXCEPTION- throw SAException when value assigned is not correctSA_STR_SAFE_CONVERT_DATA- use mutex for SAString data convertionSA_MYSQL_CACHE_KILL_CRED- cache MySQL/MariaDB connection credentials for KILL command
Code compiling build options
SA_USE_PCH- use precompiled headersSA_INCLUDES_SYBASE- specify own Sybase ASE include folderSA_CUBESQL_SRCDIR- specify folder with CubeSQL SDK sourcesSA_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/CLISA_STATIC_DB2- link SQLAPI++ with DB2 CLI librarySA_STATIC_ORACLE- link SQLAPI++ with Oracle OCI librarySA_STATIC_MYSQL- link SQLAPI++ with MySQL client librarySA_STATIC_MARIADB- link SQLAPI++ with MariaDB client librarySA_STATIC_SQLITE- link SQLAPI++ with SQLite client librarySA_STATIC_SYBASE- link SQLAPI++ with Sybase Open Client librarySA_STATIC_PGSQL- link SQLAPI++ with PostgreSQL libpqSA_STATIC_CUBESQL- link SQLAPI++ with CubeSQL sourcesSA_STATIC_ODBC- link SQLAPI++ with ODBC librarySA_STATIC_MSSQL- link SQLAPI++ with SQLServer msodbcsql librarySA_MANIFEST_EMB- embedded manifest (Microsoft Visual Studio only)