We have JDBC in Java… and SOCI in C++… Well, it’s not so easy as it should be. To build with cmake:

The documents seem outdated, many options do not work. Just managed to figure out from the *.cmake source files. You can also download the oracle instant client SDK, and re-arrange the directory structure for build.

Code snippet I extracted from its unit tests:

Updated Apr 20, 2015:

1. Under RHEL5/CentOS5, I got errors like:

It’s due to SELinux security feature. Simply workaround it with:

2. Oracle uses oraociei11.dll or libociei.so for client data. They are both large files(110+MB), since they support multiple languages. Instead, you can use oraociicus11.dll(30+MB) or libociicus.so(10-MB). These files contain only English support.