ODBC Applications on Windows

When linking your application, you must link against the appropriate import library file to have access to the ODBC functions.

The import library defines entry points for the ODBC driver manager odbc32.dll. The driver manager in turn loads the SAP Sybase IQ ODBC driver dbodbc16.dll.

Typically, the import library is stored under the Lib directory structure of the Microsoft platform SDK:

Operating system Import library
Windows (32-bit) \Lib\X86\odbc32.lib
Windows (64-bit) \Lib\X86\odbc32.lib

Example

The following command illustrates how to add the directory containing the platform-specific import library to the list of library directories in your LIB environment variable:

set LIB=%LIB%;c:\mssdk\v7.0\lib

The following command illustrates how to compile and link the application stored in odbc.c using the Microsoft compile and link tool:

cl odbc.c /I"%IQDIR16%\SDK\Lib\X86\Include" odbc32.lib