Instructions for Compiling and Linking Applications with SQLAPI++

SQLAPI++ programs need the following components of the SQLAPI++ distribution:

Header files - Compile time

Programmers need to include the SQLAPI++ header files. Those with a command-line compiler will typically use options such as '/I%SQLAPIDIR%\include' or '-I${SQLAPIDIR}/include'. The header files are in the include subdirectory of SQLAPI++ distributions:

  • #include <SQLAPI.h> - main header, should be used whenever SQLAPI++ is used.
  • #include <oraAPI.h> - Oracle API, should be included if direct OCI calls are required
  • #include <ssOleDbAPI.h> - SQLServer API, should be included if direct OLE DB calls are required
  • #include <ssNCliAPI.h> - SQLServer API, should be included if direct ODBC calls are required
  • #include <db2API.h> - DB2 API, should be included if direct DB2 CLI calls are required
  • #include <infAPI.h> - Informix API, should be included if direct Informix CLI calls are required
  • #include <ibAPI.h> - Interbase API, should be included if direct InterBase API calls are required
  • #include <sbAPI.h> - SQLBase, should be included if direct CAPI calls are required
  • #include <sybAPI.h> - Sybase, should be included if direct Open Client calls are required
  • #include <myAPI.h> - MySQL, should be included if direct MySQL C API calls are required
  • #include <pgAPI.h> - PostgreSQL, should be included if direct libpq calls are required
  • #include <odbcAPI.h> - ODBC API, should be included if direct ODBC API calls are required
  • #include <sl3API.h> - SQLite API, should be included if direct SQLite API calls are required
  • #include <asaAPI.h> - SQL Anywere API, should be included if direct SQL Anywhere C API calls are required
  • #include <oraAPI.h> - Oracle API, should be included if direct OCI calls are required

Static or dynamic libraries - Link time

Programmers need to link with static or dynamic libraries. Those with a command-line compiler will typically use options such as '/L%SQLAPIDIR%\lib sqlapi.lib' or '-L${SQLAPIDIR}/lib -lsqlapi'.

The libraries are in the lib subdirectory of SQLAPI++ distributions:

Windows:

  • sqlapi.lib - for linking with release version of dynamic library (MS Visual Studio C++)
  • sqlapid.lib - for linking with debug version of dynamic library (MS Visual Studio C++)
  • sqlapis.lib - for linking with release version of static library (MS Visual Studio C++)
  • sqlapisd.lib - for linking with debug version of static library (MS Visual Studio C++)
  • sqlapib.lib - for linking with release version of dynamic library (Borland C++)
  • sqlapibd.lib - for linking with debug version of dynamic library (Borland C++)
  • sqlapibs.lib - for linking with release version of static library (Borland C++)
  • sqlapibsd.lib - for linking with debug version of static library (Borland C++)
  • libsqlapidll.a - for linking with release version of dynamic library (MinGW)
  • libsqlapiddll.a - for linking with debug version of dynamic library (MinGW)
  • libsqlapi.a - for linking with release version of static library (MinGW)
  • libsqlapid.a - for linking with debug version of static library (MinGW)

Linux/Unix:

  • libsqlapi.so - for linking with release version of dynamic library (GNU C and C++ project compiler)
  • libsqlapid.so - for linking with debug version of dynamic library (GNU C and C++ project compiler)
  • libsqlapi.a - for linking with release version of static library (GNU C and C++ project compiler)
  • libsqlapid.a - for linking with debug version of static library (GNU C and C++ project compiler)

Unicode versions of the libraries have 'u' suffix. To compile and link the application with Unicode SQLAPI++ library you must use SA_UNICODE define.

Dynamic Link Libraries (DLLs) - Run time

Users of programs built with the dynamic SQLAPI++ libraries need these same dynamic libraries to run the programs. The DLLs are in the bin subdirectory of SQLAPI++ distributions:

Windows:

  • sqlapi.dll - for programs linked with the release version of dynamic library (MS Visual Studio C++).
  • sqlapid.dll - for programs linked with the debug version of dynamic library (MS Visual Studio C++).
  • sqlapib.dll - this is release DLL for (Borland C++).
  • sqlapibd.dll - this is debug DLL for (Borland C++).
  • libsqlapi.dll - release library compiled (MinGW).
  • libsqlapid.dll - debug library compiled with (MinGW).

Dynamic libraries are made available to programs in places such as c:\windows\system on Windows platforms, in current folder or in the path.

Linux/Unix:

  • libsqlapi.so - for programs linked with the release version of dynamic library (GNU C and C++ project compiler).
  • libsqlapid.so - for programs linked with the debug version of dynamic library (GNU C and C++ project compiler).

Unicode versions of shared libraries have 'u' suffix.

If you haven't found the answer to your questions or have some problems on using the Library, please, send e-mail to howto@sqlapi.com
SQLAPI++ 5.0.1, Mon Oct 21 2019