HI Wang Rui, On Mon, Nov 8, 2010 at 7:06 AM, Wang Rui <[email protected]> wrote: > I'm now testing static building of OSG and found a possible bug in the > present3D application. As static-link present3d should depend on > freetype, png, pdf and some other plugins, any mis-compiling of these > plugins will make present3d fail to be built. Some lirbaries like > poppler and cairo are not popular under Windows, so it is very common > that we don't have osgdb_pdf compiled and thus get errors when > building present3d. I've modified the CMakeLists and present3d.cpp to > avoid this problem.
Thanks changes look sensible and are now merged and submitted to svn/trunk. > Besides, it seems that there is another problem when using static > building: models are not able to be read, even with the USE_PLUGIN > macro. I've tested with both present3d and osgstaticviewer, and osg > and obj files, and found that the DynamicLibrary methods were still > called. But images and fonts (png, rgb and freetype) can be loaded > without problems, so I just wonder if some modification to osgDB > readNode() implementation has broken the static node reader/writer? > > I'll try to go deeper in the following few days. I believe the problem with loading .osg files is not down to the DynamicLibrary methods but that lack of support for directly linking in the symbols from the wrapper plugins in the osg plugin itself. We need to do two things - add a mechanism into the deprecated wrappers and the new serializers to be able to directly reference the wrapper library, and then to pull these in to .osg plugin. We'll probably need something like a USE_SERAILIZER_PLUGIN(osg), USE_SERAILIZER_PLUGIN(osgText) etc. in Present3D/osgstaticviewer, as well as a .cpp file in each of the serializer libs that pulls in each of the wrappers themselves. The need to do this does exclude the fact that we probably need to think about what we do about the mechanism in Registry for loading plugins when you have a static build, my guess is that we should probably be disabling this plugin loading mechansim. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
