views:

45

answers:

1

Is it possible to import a shared object (without linking the program with it) and call any function? Thanks.

+6  A: 

Yes it is possible.

Brian R. Bondy
I'm using Linux. I made a simple shared object with a the function "void say_hello()", I could import it without errors with dlopen(), but how can I call the say_hello function?
Eduardo
@Eduardo: I added a tutorial link above that shows how.
Brian R. Bondy
Thanks, it worked perfectly. Here is my test: http://eduardo38.netne.net/dlopen_test.tar.gz
Eduardo