Hi Lv, My guess is that X11 is doing #define on one of the typedefs or variables used by the include/osgDB/Serializer. This namespace polution is unfortunately effect of old C headers that one has to either re-order includes, change names to avoid conflicts or add #undef's to the headers to avoid the issue.
Robert. On Sat, May 7, 2011 at 4:55 PM, Lv Qing <[email protected]> wrote: > Hi, > > > When I integrating my osg application into a QT application ,I found some > <include> conflicting while using osg 2.9.11. > > /usr/local/include/osgDB/Serializer:640: error:expected unqualified-id before > numeric constant > /usr/local/include/osgDB/Serializer:640: error:expected `)' before numeric > constant > /usr/local/include/osgDB/Serializer:642: error:‘Setter’ undefined > /usr/local/include/osgDB/Serializer:690: error:‘Setter’ undefined > /usr/local/include/osgDB/Serializer: In constructor ‘osgDB::EnumSerializer<C, > P, B>::EnumSerializer(const char*, P, P (C::*)()const, int)’: > /usr/local/include/osgDB/Serializer:643: error class > ‘osgDB::EnumSerializer<C, P, B>’ no ‘_setter’ > /usr/local/include/osgDB/Serializer: In member function ‘virtual bool > osgDB::EnumSerializer<C, P, B>::read(osgDB::InputStream&, osg::Object&)’: > /usr/local/include/osgDB/Serializer:663: error:‘_setter’ undefined > /usr/local/include/osgDB/Serializer:668: error:‘_setter’ undefined > > I dig a little up found it conflics when I include: > > #include <osgViewer/api/X11/GraphicsWindowX11> > typedef Window WindowHandle; > typedef osgViewer::GraphicsWindowX11::WindowData WindowData; > > in osgviewerQT.cpp. > > I have faced some other <include> conflicting problems while using older osg > version ,I have just changed the <include> order sever times to solve the > problem.But this time change the order causing other conflicting wtih other > application's code. > > woo~I know it's not something wrong with OSG, just need help. > > > > > > > > > > ... > > Thank you! > > Cheers, > Lv > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=39154#39154 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

