You can use the MaxDB ODBC driver on UNIX/Linux both with and without a Driver Manager.
By entering link commands, you connect the static library libsqlod.a or the dynamic library libsqlod.so with the application. If you use dynamic links, make sure that the dynamic library libsqlod.so can be found by the system at execution time (see, for example, Idconfig, LD_LIBRARY_PATH).
You can use the following Driver Managers:
· unixODBC 2.0.9 or higher
· iODBC 3.0.5 or higher
Driver Managers simplify the exchange of ODBC drivers and allow the concurrent use of different ODBC drivers. The relevant documentation describes how to integrate an ODBC driver in the Driver Manager. The relevant documentation describes how you integrate an ODBC driver into the Driver Manager.
If you are not using a Driver Manager, you have to enter the data for the MaxDB ODBC driver manually, in either the ~/.odbc.ini or the file /etc/odbc.ini file using the file editor.
The system first uses the valid .odbc.ini file for the respective user from his or her home directory when it assigns data sources. If it cannot find a suitable data source here, it reads the entries in the /etc/odbc.ini file.
Compile the ODBC application myapp.c with appropriate ODBC header files
cc –c myapp.c –I<ODBC_include>
Static linking of the application myapp
cc –o myapp myapp.o <ODBC_lib>/libsqlod.a
Dynamic linking of the application myapp
cc –o myapp myapp.o –L<ODBC_lib> -lsqlod