'Unresolved external symbol opinit' runtime error

Article ID: 805
Last updated: 02 Feb, 2008
Article ID: 805
Last updated: 02 Feb, 2008
Revision: 1
Views: 8246
Posted: 25 Aug, 1998
by Dean J.
Updated: 02 Feb, 2008
by Dean J.
Problem


When I run my program based on DBTools.h++ shared libraries, I get a runtime error:

unresolved symbol: opinit.

Sometimes a core dump is also seen.




Cause


Opinit() is the OCI function for multithread applications programming. If multithread-safe Oracle Client libraries are used, then you should be able to find this function in both the archive library libclient.a on Solaris, for instance) and shared library (libclntsh.so on Solaris). This can verified using nm libclntsh.so | grep opinit. When this function exists in libclient but not in libclntsh, you get the relocation error: symbol not found.

Note: Static libraries don't have this problem.


Action


This is a problem with the Oracle client libraries, and there is an easy fix for this problem.

Start by making a back-up copy genclntsh and the library libclntsh.so. Look at the file $ORACLE_HOME/bin/genclntsh and find the list of symbols, which should not contain opinit if you are having the unresolved symbol problem. Add opinit alphabetically to the list, then run the script genclntsh. This should recreate the library libclntsh.so with the symbol included.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 805
Last updated: 02 Feb, 2008
Revision: 1
Views: 8246
Posted: 25 Aug, 1998 by Dean J.
Updated: 02 Feb, 2008 by Dean J.

Others in this category