I have just completed building OpenSG 2.0 with GCC 4.1.0, and I had to make a few changes to the source to get it to compile. GCC 4.1 reports an error when a template declared inside a namespace is specialized outside the namespace. It states that the specialization is occurring in a different namespace. The attached patch fixes these errors.
-Patrick -- Patrick L. Hartling | VP Engineering, Infiscape Corp. PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
Index: Source/Base/Base/OSGFactoryController.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/Base/Base/Attic/OSGFactoryController.cpp,v retrieving revision 1.1.2.7 diff -u -r1.1.2.7 OSGFactoryController.cpp --- Source/Base/Base/OSGFactoryController.cpp 26 May 2005 03:12:30 -0000 1.1.2.7 +++ Source/Base/Base/OSGFactoryController.cpp 9 May 2006 16:40:54 -0000 @@ -63,8 +63,12 @@ // Class //--------------------------------------------------------------------------- +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(FactoryControllerBase) +OSG_END_NAMESPACE + template OSG_DLL_EXPORT class SingletonHolder<FactoryControllerBase>; /***************************************************************************\ Index: Source/Base/Base/OSGTypeFactory.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/Base/Base/OSGTypeFactory.cpp,v retrieving revision 1.4.4.4 diff -u -r1.4.4.4 OSGTypeFactory.cpp --- Source/Base/Base/OSGTypeFactory.cpp 26 May 2005 03:12:30 -0000 1.4.4.4 +++ Source/Base/Base/OSGTypeFactory.cpp 9 May 2006 16:40:54 -0000 @@ -66,8 +66,12 @@ // Class //--------------------------------------------------------------------------- +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(TypeFactoryBase) +OSG_END_NAMESPACE + template class SingletonHolder<TypeFactoryBase>; /***************************************************************************\ Index: Source/Base/Field/OSGTypeInst.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/Base/Field/OSGTypeInst.cpp,v retrieving revision 1.5.4.8 diff -u -r1.5.4.8 OSGTypeInst.cpp --- Source/Base/Field/OSGTypeInst.cpp 9 Aug 2005 04:17:06 -0000 1.5.4.8 +++ Source/Base/Field/OSGTypeInst.cpp 9 May 2006 16:40:54 -0000 @@ -288,6 +288,8 @@ #endif //!defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) +OSG_BEGIN_NAMESPACE + OSG_FIELD_DLLEXPORT_DEF2(SField, bool, 2) OSG_FIELD_DLLEXPORT_DEF1(SField, Int8 ) OSG_FIELD_DLLEXPORT_DEF1(SField, UInt8 ) @@ -505,6 +507,8 @@ OSG_FIELD_DLLEXPORT_DEF1(MField, Matrix ) OSG_FIELD_DLLEXPORT_DEF1(MField, Quaternion ) +OSG_END_NAMESPACE + /*-------------------------------------------------------------------------*/ /* cvs id's */ Index: Source/Base/Network/Base/OSGConnectionFactory.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/Base/Network/Base/OSGConnectionFactory.cpp,v retrieving revision 1.4.4.2 diff -u -r1.4.4.2 OSGConnectionFactory.cpp --- Source/Base/Network/Base/OSGConnectionFactory.cpp 26 May 2005 03:12:31 -0000 1.4.4.2 +++ Source/Base/Network/Base/OSGConnectionFactory.cpp 9 May 2006 16:40:54 -0000 @@ -56,8 +56,12 @@ OSG_USING_NAMESPACE +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(ConnectionFactoryBase) +OSG_END_NAMESPACE + template class SingletonHolder<ConnectionFactoryBase>; Index: Source/System/FieldContainer/Base/OSGFieldBundleFactory.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/System/FieldContainer/Base/Attic/OSGFieldBundleFactory.cpp,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 OSGFieldBundleFactory.cpp --- Source/System/FieldContainer/Base/OSGFieldBundleFactory.cpp 14 Nov 2003 05:30:45 -0000 1.1.2.2 +++ Source/System/FieldContainer/Base/OSGFieldBundleFactory.cpp 9 May 2006 16:40:54 -0000 @@ -55,8 +55,12 @@ OSG_USING_NAMESPACE +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(FieldBundleFactoryBase) +OSG_END_NAMESPACE + template class SingletonHolder<FieldBundleFactoryBase>; /*-------------------------------------------------------------------------*/ Index: Source/System/FieldContainer/Base/OSGFieldContainerFactory.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/System/FieldContainer/Base/Attic/OSGFieldContainerFactory.cpp,v retrieving revision 1.1.2.3 diff -u -r1.1.2.3 OSGFieldContainerFactory.cpp --- Source/System/FieldContainer/Base/OSGFieldContainerFactory.cpp 9 Aug 2005 09:45:33 -0000 1.1.2.3 +++ Source/System/FieldContainer/Base/OSGFieldContainerFactory.cpp 9 May 2006 16:40:54 -0000 @@ -53,8 +53,12 @@ OSG_USING_NAMESPACE +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(FieldContainerFactoryBase) +OSG_END_NAMESPACE + template class SingletonHolder<FieldContainerFactoryBase>; FieldContainerMapper::~FieldContainerMapper(void) Index: Source/System/FieldContainer/Fields/OSGFieldBundleFields.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/System/FieldContainer/Fields/Attic/OSGFieldBundleFields.cpp,v retrieving revision 1.1.2.1 diff -u -r1.1.2.1 OSGFieldBundleFields.cpp --- Source/System/FieldContainer/Fields/OSGFieldBundleFields.cpp 24 Oct 2005 07:33:46 -0000 1.1.2.1 +++ Source/System/FieldContainer/Fields/OSGFieldBundleFields.cpp 9 May 2006 16:40:54 -0000 @@ -71,9 +71,13 @@ //OSG_FIELD_DLLEXPORT_DEF1(SField, Int8 ) +OSG_BEGIN_NAMESPACE + OSG_FIELD_DLLEXPORT_DEF1(MField, FieldBundleP ) OSG_FIELD_DLLEXPORT_DEF2(MField, ParentFieldBundleP, 1) +OSG_END_NAMESPACE + /*-------------------------------------------------------------------------*/ /* cvs id's */ Index: Source/System/FileIO/Base/OSGSceneFileHandler.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/System/FileIO/Base/OSGSceneFileHandler.cpp,v retrieving revision 1.3.4.8 diff -u -r1.3.4.8 OSGSceneFileHandler.cpp --- Source/System/FileIO/Base/OSGSceneFileHandler.cpp 9 Feb 2006 05:21:43 -0000 1.3.4.8 +++ Source/System/FileIO/Base/OSGSceneFileHandler.cpp 9 May 2006 16:40:56 -0000 @@ -72,8 +72,12 @@ OSG_USING_NAMESPACE +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(SceneFileHandlerBase) +OSG_END_NAMESPACE + template class SingletonHolder<SceneFileHandlerBase>; GraphOpSeq *SceneFileHandlerBase::_defaultgraphOpSeq = NULL; Index: Source/System/Image/OSGImageFileHandler.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/System/Image/OSGImageFileHandler.cpp,v retrieving revision 1.9.4.6 diff -u -r1.9.4.6 OSGImageFileHandler.cpp --- Source/System/Image/OSGImageFileHandler.cpp 9 Feb 2006 05:21:43 -0000 1.9.4.6 +++ Source/System/Image/OSGImageFileHandler.cpp 9 May 2006 16:40:56 -0000 @@ -73,8 +73,12 @@ * Types *****************************/ +OSG_BEGIN_NAMESPACE + OSG_SINGLETON_INST(ImageFileHandlerBase) +OSG_END_NAMESPACE + template class SingletonHolder<ImageFileHandlerBase>; /***************************** Index: Source/System/NodeCores/Drawables/Geometry/Properties/OSGTypedGeoVectorProperty.cpp =================================================================== RCS file: /cvsroot/opensg/OpenSG/Source/System/NodeCores/Drawables/Geometry/Properties/Attic/OSGTypedGeoVectorProperty.cpp,v retrieving revision 1.1.2.5 diff -u -r1.1.2.5 OSGTypedGeoVectorProperty.cpp --- Source/System/NodeCores/Drawables/Geometry/Properties/OSGTypedGeoVectorProperty.cpp 24 Oct 2005 10:16:07 -0000 1.1.2.5 +++ Source/System/NodeCores/Drawables/Geometry/Properties/OSGTypedGeoVectorProperty.cpp 9 May 2006 16:40:56 -0000 @@ -82,6 +82,8 @@ } +OSG_BEGIN_NAMESPACE + OSG_EXPORT_PROP(GeoVec1ubPropertyDesc) OSG_EXPORT_PROP(GeoVec2ubPropertyDesc) OSG_EXPORT_PROP(GeoVec3ubPropertyDesc) @@ -192,3 +194,5 @@ OSG_EXPORT_PROP(GeoColor3fPropertyDesc) OSG_EXPORT_PROP(GeoColor4fPropertyDesc) + +OSG_END_NAMESPACE
signature.asc
Description: OpenPGP digital signature
