This section does not apply to Windows Mobile. For Windows Mobile information, see Linking ODBC applications on Windows Mobile.
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 SQL Anywhere ODBC driver dbodbc12.dll.
Add the directory containing the platform-specific import library to the list of library directories in your LIB environment variable.
Typically, the import library is stored under the Lib directory structure of the Microsoft platform SDK:
Operating system | Import library |
---|---|
Windows (32-bit) | Lib\odbc32.lib |
Windows (64-bit) | Lib\x64\odbc32.lib |
Here is an example for a command prompt.
set LIB=%LIB%;C:\mssdk\v6.1\lib |
To compile and link a simple ODBC application using the Microsoft compile and link tool, you can issue a single command from the command prompt. The following example compiles and links the application stored in odbc.c.
cl odbc.c /Ic:\sa12\SDK\Include odbc32.lib |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |