Hi,

I have a main program that is loading up modules dynamically at run time.
Suppose I have a function "foo" in the namespace "Module" (Module::Foo)
within the main program. I need a way to access it from a dynamically loaded
module. If I link with the source file containing the namespaces, it will
create duplicate copies and when some variable is accessed, it will be the
duplicate and not the one from the main program.

If I declare the function as extern in the module, the module compiles fine
but dlopen() complains that foo() is missing and fails. Any suggestions as
to how I can accomplish this?

Thanks
Manohar

Reply via email to