loadable plugin architecture for g++

J

Jenny

I am writing a program which may dynamically load *.so files as
plugin. I was looking libltdl and the one which is described here
http://www.belgeler.org/autobook/autobook-A-Simple-GNU-Linux-Module-Loader.html.
My problem is that I need to pass a object to the loaded module, but
it seems I can only pass char* as the parameter to the module whith
these APIs. Is there any other API which may let me do something like
this?
I was thinking about using SystemV share memory to do this, but the
same problem, I don't think it is suitable to handle the object with
complex data.
 
V

Victor Bazarov

Jenny said:
I am writing a program which may dynamically load *.so files as
plugin. I was looking libltdl and the one which is described here
http://www.belgeler.org/autobook/autobook-A-Simple-GNU-Linux-Module-Loader.html.
My problem is that I need to pass a object to the loaded module, but
it seems I can only pass char* as the parameter to the module whith
these APIs. Is there any other API which may let me do something like
this?
I was thinking about using SystemV share memory to do this, but the
same problem, I don't think it is suitable to handle the object with
complex data.

You're in a wrong newsgroup. comp.lang.c++ does not concern itself
with dynamic modules simply because the language doesn't have any
definition of them. The object model of C++ assumes that there is
only one program running in a sequential manner. No processes, no
shared memory, no threads, no nothing. All that is defined at the
OS level, so you need to post your query to a newsgroup that deals
with your OS.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top