Reputation: 2030
I need to link our C/C++ code that is using the DB2 ODBC driver on linux, and although ive pulled in sqlcli.h I dont know where to find the objects so i can link.
Ive installed DB2 v9.1 ESE so i wouldve thought i could get everything.
Anybody got any ideas?
Upvotes: 1
Views: 1296
Reputation: 368647
Your application (on the client) would link to a Unix ODBC library -- either iODBC or unixodbc. Both are commonly available on Debian and Ubuntu and other distros.
Next, you install the ODBC driver from the server database. This means you need to get a DB2 ODBC driver onto your system.
With that, your application is capable of 'talking ODBC' and has someone to talk to: the ODBC driver of DB2.
To give another concrete example, I compile RODBC again unixodbc-dev for Debian and can then talk via ODBC to MySQL and Postgresql as I have drivers for both. [ This is of course contrived as both MySQL and Postgresql have native drivers too, but it servers as a test of RODBC. ]
Upvotes: 2