I have had the same problem some time ago. After a deep research, the only option I found was to build different executable versions for the different ORACLE servers (respectively, linked with the different versions of the library).
Of course, this could be done another way - runtime distinguish which version of the lib you need, have both versions installed and dynamically load the correct version of the library, using dlopen
. But I never tried this, as I didn't actually need it. But it could work, as far as both library versions could be installed on the same machine at the same time without conflicting with each other. Sounds possible to me.
Here are two links, that may be helpful:
- How to link with specific library ( g++; libstdc++.so.5 and libstdc++.so.6 )
- https://forums.oracle.com/forums/thread.jspa?messageID=4545221
The first one shows, that you need to have specific library version for your specific environment. My problem was, that I had to have occi 10.2.0.4
on a RHEL5, which comes with libstdc++.so.6
, while occi 10.2.0.4
depends on libstdc++.so.5
. The only solution was to write in OCCI's forum (the second link), where after a while, they gave me the correct build, which was occi 10.2.0.4
built with libstdc++.so.6
and not with libstdc++.so.5
Luckily, you won't have such problems, but I decided, that this could be useful for you.