Results 1 to 2 of 2
Hi, Right now I am porting an application from solaris to Red hat linux. I have faced a run time problem while running my application. The error says that " ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-10-2005 #1
- Join Date
- Nov 2005
run time error undefined symbol in the shared object
Right now I am porting an application from solaris to Red hat linux.
I have faced a run time problem while running my application.
The error says that " undefined symbol in the shared object"
We are using dlopen() to open a library.
One of the arguments used inside that dlopen() in the place of flag "RTLD_LAZY" for solaris.
Should I change the argument to RTLD_NOW or RTLD_GLOBAL in Linux ?
I am unable to find the exact meaning of that error.
Any suggestions would help me a lot.
- 11-10-2005 #2
- Join Date
- Oct 2004
Is the shared library your code or is it part of the distribution?
Shared libraries DO NOT have the same entry points defined always across distibutions
In other words, your code is trying to find a symbol, call it myxxx.
That error says the symbol myxxx is not in shared library where it was expected to be found.
Linux often has different version numbers in the names for the various versions of the same library, eg, libc_6.01.2.so -- with a single link in the
/usr/lib directory (in this example libc.1) to point to the most current file.
You need to re-link specfying the EXACT name of the library not something like "-lpthread" That way, dlopen will try the right version of the library.
Your problem is not in the dlopen call, it is in what dlopen is looking at.