Page 1 of 1

Mesher build fail

Posted: Wed Apr 16, 2014 8:06 am
by loki1950
Can't seem to to build mesher on fedora 20 with Ogre v1.8.1 which is a maintenance release attaching the tail end of the build log that has the errors it seems from the context to be related to LOD generation.

Enjoy the Choice :)

Re: Mesher build fail

Posted: Sat Apr 19, 2014 10:57 am
by www2
He loki.
I have the same problem with ubuntu 14.04 x68_64 and Ogre v1.9.0.

Re: Mesher build fail

Posted: Sat Apr 19, 2014 2:39 pm
by loki1950
Then there must have been an API change in Ogre which is quite likely from the error they haven't maintained backward compatibility in the past.

Enjoy the Choice :)

Re: Mesher build fail

Posted: Sat Apr 19, 2014 2:41 pm
by www2
Now be site mesher there is a Ogre dependesy in vegaserver

Re: Mesher build fail

Posted: Sun Apr 20, 2014 4:03 am
by ezee
yeah , there were critical changes between 1.7 and 1.8 versions .
The most common is with ms_singleton and msSingleton .

**** I removed a lot of bla bla because i've found the origin of the problem :
The Ogre devs forgot to add #include "OgreProgressiveMesh.h" into ogre.h ...
So go to ogre.h , and add under
#include "OgreParticleSystemManager.h"
#include "OgreProgressiveMesh.h"//added by ezee
Magic , your error 1 is fixed !
:wink:

Edit : Okay , i have compiled and linked mesher from the 1.5.1 rc1 tag , all fine .
But i don't have used this flag yet ( in to_OgreMesh.cpp ) :
#ifdef HAVE_OGRE
you guys could check if your projects use " HAVE_OGRE " , and remove it in case you are
stucks . I will try to compile and link with it , and report later.
good luck .

:!: edit2 : MY REPORT WITH " HAVE_OGRE " set
1>to_OgreMesh.cpp
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1084) : error C2660: 'Ogre::VertexDeclaration::getAutoOrganisedDeclaration' : function does not take 2 arguments
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1119) : error C2027: use of undefined type 'Ogre::ProgressiveMesh'
1> d:\program files\ogresdk_vc9_v1-8-1\include\ogre\OgrePrerequisites.h(240) : see declaration of 'Ogre::ProgressiveMesh'
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1119) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1119) : error C2146: syntax error : missing ';' before identifier 'quota'
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1119) : error C2065: 'quota' : undeclared identifier
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1119) : error C2027: use of undefined type 'Ogre::ProgressiveMesh'
1> d:\program files\ogresdk_vc9_v1-8-1\include\ogre\OgrePrerequisites.h(240) : see declaration of 'Ogre::ProgressiveMesh'
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1119) : error C2065: 'VRQ_PROPORTIONAL' : undeclared identifier
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1138) : error C2039: 'generateLodLevels' : is not a member of 'Ogre::Mesh'
1> d:\program files\ogresdk_vc9_v1-8-1\include\ogre\OgreMesh.h(91) : see declaration of 'Ogre::Mesh'
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1138) : error C2065: 'quota' : undeclared identifier
So remove "HAVE_OGRE" and you will compile ok .
I will try to fix the ogre problem now .
:wink:

edit : fixed ! 8)

Re: Mesher build fail

Posted: Sun Apr 20, 2014 6:54 am
by ezee
1_Fix to :
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1084) : error C2660: 'Ogre::VertexDeclaration::getAutoOrganisedDeclaration' : function does not take 2 arguments
added in red :
Ogre::VertexDeclaration *newDcl =
data->vertexDeclaration->getAutoOrganisedDeclaration(
mesh->hasSkeleton(), mesh->hasVertexAnimation() || (mesh->getPoseCount() > 0),mesh->getSharedVertexDataAnimationIncludesNormals() );
2_Fix to :
1>..\..\vegastrike\objconv\mesher\to_OgreMesh.cpp(1119) : error C2027: use of undefined type 'Ogre::ProgressiveMesh'
added ( in red ) in ogre.h , under #include "OgreParticleSystemManager.h" :
#include "OgreProgressiveMesh.h"//added by ezee
3_Fix to : ( same error than loki )
fixed by the fix2 eh eh the original line should compile now:
Ogre::ProgressiveMesh::VertexReductionQuota const quota = Ogre::ProgressiveMesh::VertexReductionQuota::VRQ_PROPORTIONAL;
last fix ( error 2 for loki ) :
home/denisf20/Projects/vegastrike/objconv/mesher/to_OgreMesh.cpp:1138:18: error: ‘class Ogre::Mesh’ has no member named ‘generateLodLevels’
newMesh->generateLodLevels( distanceList, quota, reduction );
changed the line with :
Ogre::ProgressiveMesh::generateLodLevels(newMesh->getSubMesh(0)->parent, distanceList,quota, reduction );

Re: Mesher build fail

Posted: Sun Apr 20, 2014 7:15 am
by loki1950
Thank you ezee will do that when I am *nix side later time to update my win7 Ogre3D SDK and build the samples :wink:

Enjoy the Choice :)

Re: Mesher build fail

Posted: Sun Apr 20, 2014 7:20 am
by ezee
1>------ Build started: Project: Mesher, Configuration: Release Win32 ------
1>Compiling...
1>to_OgreMesh.cpp
1>Build log was saved at "file://D:\program\experimental\vega-vc9\Release\Mesher\BuildLog.htm"
1>Mesher - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Wohooo !
:wink:

You will probably run into new problem at link stage , because of boost .
I have successfully linked my win32 project with boost 1.47 ( newer don't have /numeric ),
i had to download 2 precompiled binaries lib :
http://sourceforge.net/projects/boost/f ... es/1.47.0/

But if you are lucky you will link without problem .
DON'T FORGET TO LINK WITH OgreMain.lib !

Result :
1>------ Build started: Project: Mesher, Configuration: Release Win32 ------
1>Linking...
1>Generating code
1>Finished generating code
1>Embedding manifest...
1>Build log was saved at "file://D:\program\experimental\vega-vc9\Release\Mesher\BuildLog.htm"
1>Mesher - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Cool , i will try the ogre exporter ...
:wink:

For win32/possibly64 users , i have made a .rar file that contain mesher2.exe ( only the name differ from the original )+OgreMain.dll : http://spacetechs.free.fr/VEGASTRIKEDEV ... _win32.rar