I have successfully built and used Ogre for Android on one machine. However, when I cloned the latest Ogre in a new machine and built it, I met errors in Java component:
In file included from /usr1/AR/ogre/OgreMain/include/Ogre.h:71:0,
from /usr1/AR/ogre/build/java/src/org/Ogre/OgreJAVA_wrap.cxx:431:
/usr1/AR/ogre/OgreMain/include/OgreInstanceManager.h: In function 'jlong Java_org_Ogre_OgreJNI_InstanceManager_1getInstanceBatchMapIterator(JNIEnv*, jclass, jlong, jobject)':
/usr1/AR/ogre/OgreMain/include/OgreInstanceManager.h:98:53: error: 'typedef Ogre::vector<Ogre::InstanceBatch*>::type Ogre::InstanceManager::InstanceBatchVec' is private
typedef vector<InstanceBatch*>::type InstanceBatchVec; //vec[batchN] = Batch
^
/usr1/AR/ogre/build/java/src/org/Ogre/OgreJAVA_wrap.cxx:203729:3: error: within this context
SwigValueWrapper< Ogre::ConstMapIterator< Ogre::map< Ogre::String,Ogre::InstanceManager::InstanceBatchVec,std::less< Ogre::String > >::type > > result;
^
[ 85%] Building CXX object Components/Terrain/CMakeFiles/OgreTerrain.dir/src/OgreTerrainMaterialShaderHelperGLSL.cpp.o
[ 85%] Building CXX object Components/Terrain/CMakeFiles/OgreTerrain.dir/src/OgreTerrainMaterialShaderHelperHLSL.cpp.o
[ 85%] Building CXX object Components/Terrain/CMakeFiles/OgreTerrain.dir/src/OgreTerrainQuadTreeNode.cpp.o
[ 85%] Built target pch_Generate_OgreMeshLodGenerator
Scanning dependencies of target OgreMeshLodGenerator
make[2]: *** [Components/Java/CMakeFiles/OgreJNI.dir/__/__/java/src/org/Ogre/OgreJAVA_wrap.cxx.o] Error 1
make[1]: *** [Components/Java/CMakeFiles/OgreJNI.dir/all] Error 2
Can anyone tell me how to fix it? Thanks!
Error in recent change for Java component
-
- Gnoblar
- Posts: 17
- Joined: Tue Nov 28, 2017 12:19 am
-
- OGRE Team Member
- Posts: 2106
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1132
Re: Error in recent change for Java component
master builds on CI at least:
https://travis-ci.org/OGRECave/ogre/jobs/340176548
note the updated swig version to 3.0.8. In doubt make a clean built as swig sometimes does not re-parse the source headers.
https://travis-ci.org/OGRECave/ogre/jobs/340176548
note the updated swig version to 3.0.8. In doubt make a clean built as swig sometimes does not re-parse the source headers.
-
- Gnoblar
- Posts: 17
- Joined: Tue Nov 28, 2017 12:19 am
Re: Error in recent change for Java component
Ah, yes, upgrade SWIG to 3.0.12 resolved the problem.
-
- Gnoblar
- Posts: 1
- Joined: Tue May 15, 2018 2:34 pm