I've run into a little problem with plugins. My plugin is for adding a different GLSupport implementation to the GL RenderSystem. I patched my working copy so that is possible on the render system side. I've mentioned this problem here already, but I thought, since it is a general problem, I'd ask in a more general thread.
My problem is that when I build the plugin separately, some symbols are not defined (e.g. Ogre::GLSupport, the base class). This is easy to circumvent at compile time with "-undefined dynamic_load" (at least on OSX which I am using). On Linux, allowing undefined symbols in shared libs seems to be the default.
However, even if I have already loaded the RenderSystem_GL plugin in the final program during runtime, which defines GLSupport, etc, the dynamic library loader still complains about the missing symbols when I load the second plugin. So, the loaded symbols don't seem to propagate to the main program.
Does anyone know how to deal with this problem? Should I add specific plugin loading capability directly to the GL RenderSystem?
Thanks for your help!
Edit: PS: The exact error I get when trying to load the plugin:
Code: Select all
*-*-* OGRE Initialising
*-*-* Version 1.4.9 (Eihort)
Loading library RenderSystem_GL
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Loading library QtGLPlugin
2008-08-23 15:20:22.428 demo[3951] CFLog (21): Error loading /Library/Frameworks/Ogre.framework/Resources/QtGLPlugin.bundle/Contents/MacOS/QtGLPlugin: error code 4, error number 0 (Symbol not found: __ZN4Ogre9GLSupport20initialiseExtensionsEv
Referenced from: /Library/Frameworks/Ogre.framework/Resources/QtGLPlugin.bundle/Contents/MacOS/QtGLPlugin
Expected in: dynamic lookup
)
terminate called after throwing an instance of 'Ogre::InternalErrorException'
what(): OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library QtGLPlugin. System Error: Unknown Error in DynLib::load at /Users/max/Desktop/ogre/Mac/Ogre/../../OgreMain/src/OgreDynLib.cpp (line 80)
Abort trap