This is a little off topic but how do I associate a global/static data in a 
dynamic library (i.e. .so in LINUX) with a global/static in a main application?

I'm attempting to do exactly the same things as the OSG Registry class but with 
my own class "Registry" class. Instead of registering OSG Plugins (as done by 
the OSG Registry), I want to "register" my own application plugins using my own 
registry. I've done this outside the OSG build area and in my own application 
area. 

I'm using registry->loadLibrary() to load my dynamic library but when loading 
this .so, it creates its own s_registry singleton rather than linking to the 
one declared in my main application (static in registry->instance()). 

I don't seem to have this problem with the OSG Registry class (i.e. only one 
instance of it). What am I doing wrong? Do I need some special compiler 
options? 

While I'm at it, how do I see exactly what compiler flags are used by OSG for 
their plugins (using "make -n" I see calls to cmake but not the exact compiler 
options).

I'm using OSG 2.8.3 on a Linux machine.

Thanks,
Paul P.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28097#28097





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to