Shared libraries and dlopen/dlsym..

Shared libraries and dlopen/dlsym..

Post by Paul Lenso » Sat, 07 Oct 2000 11:03:38



I'm having a problem on aix 4.3. I have several shared objects which I can
implicitly load when the application loads. However I have some others that
I explicitly load using dlopen. This apparently succeeds and using dlsym I
get a function pointer to a function in the shared object that is apparently
valid. However, when I attempt to use the function pointer, things crash.
Is there something special I need to do to explicitly load shared libraries?

Thanks in advance...

 
 
 

1. Loading libraries run-time: dlopen, dlsym, dlclose

I was reading through the man pages on my system and came across some
functions which seem to indicate that I can load a library at run-time
without statically linking the load information stubs into my program.
The functions in question are dlopen, dlsym, dlerror and dlclose.
They are especially of interest to me because my application has a
core which is static (ie in development) but which can be extended
without change by loading different libraries at different times.
For example, I may want my application to enter into a module by a
specific function name, and each of these functions has the same
argument type. This will be ideal if, for instance, I have three
different e-mail systems, and I want to be able to tie the three
together.

As I mentioned I found them in the man pages by man -k "dynamic link"
but there were no actual man pages. I found the prototypes in
/usr/include/dlfcn.h, but couldn't find which library to link into.

Does anyone know the library(s) or where I can get the right
information/documentation? It's not in the LPG - I checked.

Thanks in advance.

2. problem with sound

3. Shared variable between main() and loaded shared library - dlopen()

4. log of the /etc/rc2.d Start scripts

5. shared library, symbol names and dlsym()

6. GCC

7. how do you compile a shared library which is accessed with dlsym()

8. Need more Solaris on Intel resources

9. Problem: dlsym in Shared Library

10. Bugs in shared libraries (dlopen / dlclose)..

11. Shared Library Problem::: dlopen()

12. Problem with dlopen and custom shared library.

13. Problem loading a shared library with dlopen