Page 1 of 1

Error in recent change for Java component

Posted: Tue Feb 13, 2018 1:24 am
by redpearl
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!

Re: Error in recent change for Java component

Posted: Wed Feb 14, 2018 2:54 am
by paroj
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.

Re: Error in recent change for Java component

Posted: Thu Feb 15, 2018 1:19 am
by redpearl
Ah, yes, upgrade SWIG to 3.0.12 resolved the problem.

Re: Error in recent change for Java component

Posted: Tue May 15, 2018 2:36 pm
by MichaelMinor
redpearl wrote:
Thu Feb 15, 2018 1:19 am
Ah, yes, upgrade SWIG to 3.0.12 resolved the problem.
nice, that is what I was need :!: