Re: [osg-users] [osgPlugins] FBX plugin compile error in OSG 2.9.8 SVN
Hi Dario, does it work if you move struct PolygonRef{...}; outside the function e.g. to line 650? -Michael (back from holidays!) On 27 July 2010 15:25, Dario Minieri para...@cheapnet.it wrote: Hi, I'm trying to compile OSG 2.9.9 from the SVN but I have some errors with fbx plugin during compilation: Code: [ 84%] Building CXX object src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRMesh.o In file included from /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:7, from /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26: /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h:65: warning: comma at end of enumerator list In file included from /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26: /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h: In constructor 'OsgFbxReader::OsgFbxReader(fbxsdk_2011_2::KFbxSdkManager, fbxsdk_2011_2::KFbxScene, FbxMaterialToOsgStateSet, const std::setconst fbxsdk_2011_2::KFbxNode*, std::lessconst fbxsdk_2011_2::KFbxNode*, std::allocatorconst fbxsdk_2011_2::KFbxNode* , const osgDB::Options, OsgFbxReader::AuthoringTool, bool, bool)': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:37: warning: 'OsgFbxReader::authoringTool' will be initialized after /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:30: warning: 'bool OsgFbxReader::lightmapTextures' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:47: warning: when initialized here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In member function 'osgDB::ReaderWriter::ReadResult OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*, fbxsdk_2011_2::KFbxMesh*, std::vectorStateSetContent, std::allocatorStateSetContent , const char*)': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:717: warning: suggest parentheses around assignment used as truth value /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: template argument for 'templateclass _Alloc class std::allocator' uses local type 'OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*, fbxsdk_2011_2::KFbxMesh*, std::vectorStateSetContent, std::allocatorStateSetContent , const char*)::PolygonRef' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: trying to instantiate 'templateclass _Alloc class std::allocator' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: template argument 2 is invalid /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: invalid type in declaration before ';' token /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:807: error: request for member 'push_back' in 'polygonRefList', which is of non-class type 'PolygonRefList' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:840: error: expected initializer before 'it' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error: 'it' was not declared in this scope /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error: 'itEnd' was not declared in this scope /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'int getVertexIndex(const fbxsdk_2011_2::KFbxLayerElementTemplateT*, const fbxsdk_2011_2::KFbxMesh*, int, int, int) [with T = fbxsdk_2011_2::KFbxVector4]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:563: instantiated from here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: enumeration value 'eNONE' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: enumeration value 'eBY_EDGE' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: enumeration value 'eALL_SAME' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) [with T = fbxsdk_2011_2::KFbxVector4]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:697: instantiated from here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: enumeration value 'eINDEX' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) [with T = fbxsdk_2011_2::KFbxColor]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:698: instantiated from here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: enumeration value 'eINDEX' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) [with T = fbxsdk_2011_2::KFbxVector2]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:700: instantiated from here
[osg-users] [osgPlugins] FBX plugin compile error in OSG 2.9.8 SVN
Hi, I'm trying to compile OSG 2.9.9 from the SVN but I have some errors with fbx plugin during compilation: Code: [ 84%] Building CXX object src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRMesh.o In file included from /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:7, from /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26: /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h:65: warning: comma at end of enumerator list In file included from /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26: /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h: In constructor 'OsgFbxReader::OsgFbxReader(fbxsdk_2011_2::KFbxSdkManager, fbxsdk_2011_2::KFbxScene, FbxMaterialToOsgStateSet, const std::setconst fbxsdk_2011_2::KFbxNode*, std::lessconst fbxsdk_2011_2::KFbxNode*, std::allocatorconst fbxsdk_2011_2::KFbxNode* , const osgDB::Options, OsgFbxReader::AuthoringTool, bool, bool)': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:37: warning: 'OsgFbxReader::authoringTool' will be initialized after /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:30: warning: 'bool OsgFbxReader::lightmapTextures' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:47: warning: when initialized here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In member function 'osgDB::ReaderWriter::ReadResult OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*, fbxsdk_2011_2::KFbxMesh*, std::vectorStateSetContent, std::allocatorStateSetContent , const char*)': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:717: warning: suggest parentheses around assignment used as truth value /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: template argument for 'templateclass _Alloc class std::allocator' uses local type 'OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*, fbxsdk_2011_2::KFbxMesh*, std::vectorStateSetContent, std::allocatorStateSetContent , const char*)::PolygonRef' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: trying to instantiate 'templateclass _Alloc class std::allocator' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: template argument 2 is invalid /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: invalid type in declaration before ';' token /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:807: error: request for member 'push_back' in 'polygonRefList', which is of non-class type 'PolygonRefList' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:840: error: expected initializer before 'it' /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error: 'it' was not declared in this scope /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error: 'itEnd' was not declared in this scope /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'int getVertexIndex(const fbxsdk_2011_2::KFbxLayerElementTemplateT*, const fbxsdk_2011_2::KFbxMesh*, int, int, int) [with T = fbxsdk_2011_2::KFbxVector4]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:563: instantiated from here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: enumeration value 'eNONE' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: enumeration value 'eBY_EDGE' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: enumeration value 'eALL_SAME' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) [with T = fbxsdk_2011_2::KFbxVector4]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:697: instantiated from here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: enumeration value 'eINDEX' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) [with T = fbxsdk_2011_2::KFbxColor]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:698: instantiated from here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: enumeration value 'eINDEX' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) [with T = fbxsdk_2011_2::KFbxVector2]': /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:700: instantiated from here /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: enumeration value 'eINDEX' not handled in switch /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'int getPolygonIndex(const fbxsdk_2011_2::KFbxLayerElementTemplateT*,