Linux Build error [solved]

SuperMegaMau

30-11-2006 19:33:48

hi,

I was trying to build the last CVS version of PagingLandscape and I got this error message:


g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../PlugIns/PagingLandScape2/include -DEXT_HASH -I/usr/include/OGRE -g -O2 -MT OgrePagingLandScapeAxisAlignedBoxSceneQuery.lo -MD -MP -MF .deps/OgrePagingLandScapeAxisAlignedBoxSceneQuery.Tpo -c OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp -fPIC -DPIC -o .libs/OgrePagingLandScapeAxisAlignedBoxSceneQuery.o
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp: In member function 'bool<unnamed>::LodTracker::GetWorldVertex(int, int, Ogre::Vector3&)':
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:272: error: invalid use of undefined type 'const struct Ogre::PagingLandScapePage'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:124: error: forward declaration of 'const struct Ogre::PagingLandScapePage'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:277: error: invalid use of undefined type 'const struct Ogre::PagingLandScapeData2D'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:179: error: forward declaration of 'const struct Ogre::PagingLandScapeData2D'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:278: error: invalid use of undefined type 'const struct Ogre::PagingLandScapePage'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:124: error: forward declaration of 'const struct Ogre::PagingLandScapePage'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp: In member function 'void<unnamed>::LodTracker::SetPage(const Ogre::PagingLandScapePage*)':
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:289: error: invalid use of undefined type 'const struct Ogre::PagingLandScapePage'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:124: error: forward declaration of 'const struct Ogre::PagingLandScapePage'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:291: error: invalid use of undefined type 'const struct Ogre::PagingLandScapePage'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:124: error: forward declaration of 'const struct Ogre::PagingLandScapePage'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp: In member function 'void<unnamed>::LodTracker::SetPage(int, int)':
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:299: error: invalid use of undefined type 'struct Ogre::PagingLandScapePageManager'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:126: error: forward declaration of 'struct Ogre::PagingLandScapePageManager'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:300: error: invalid use of undefined type 'const struct Ogre::PagingLandScapePage'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:124: error: forward declaration of 'const struct Ogre::PagingLandScapePage'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp: In member function 'void<unnamed>::LodTracker::UpdateTile(int, int)':
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:311: error: invalid use of undefined type 'const struct Ogre::PagingLandScapePage'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:124: error: forward declaration of 'const struct Ogre::PagingLandScapePage'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:315: error: invalid use of undefined type 'struct Ogre::PagingLandScapeTile'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:155: error: forward declaration of 'struct Ogre::PagingLandScapeTile'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:315: error: invalid use of undefined type 'struct Ogre::PagingLandScapeTile'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:155: error: forward declaration of 'struct Ogre::PagingLandScapeTile'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:316: error: invalid use of undefined type 'struct Ogre::PagingLandScapeTile'
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapePrerequisites.h:155: error: forward declaration of 'struct Ogre::PagingLandScapeTile'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp: In member function 'virtual void Ogre::PagingLandScapeAxisAlignedBoxSceneQuery::execute(Ogre::SceneQueryListener*)':
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:617: warning: passing 'const Ogre::Real' for argument 2 to '<unnamed>::LodTracker::LodTracker(Ogre::Vector3, int, int, Ogre::uint, Ogre::uint, Ogre::uint, Ogre::PagingLandScapePageManager*, Ogre::PagingLandScapeData2DManager*)'
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:617: warning: passing 'const Ogre::Real' for argument 3 to '<unnamed>::LodTracker::LodTracker(Ogre::Vector3, int, int, Ogre::uint, Ogre::uint, Ogre::uint, Ogre::PagingLandScapePageManager*, Ogre::PagingLandScapeData2DManager*)'
make[4]: *** [OgrePagingLandScapeAxisAlignedBoxSceneQuery.lo] Error 1


I'm using Ogre 1.2.4 and GCC 4.1.1

tuan kuranes

01-12-2006 08:00:07

Sorry, using precompiled headers here make incorrect headers for platform not supporting those...

Add

#include "OgrePagingLandScapeTile.h"
#include "OgrePagingLandScapePage.h"
#include "OgrePagingLandScapePageManager.h"

at end of header includes of the OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp file.

updated in CVS.

SuperMegaMau

01-12-2006 15:45:03

ok, thanks that's it, but you need to add one last header to that file OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp

#include "OgrePagingLandScapeData2D.h"

tuan kuranes

01-12-2006 16:53:06

I'll add that asap.
Btw, I really have to find how to enable precompiled headers under linux, that would speed up build overthere too, I guess. under WIN32, that's an impressive time boost.

SuperMegaMau

02-12-2006 02:15:31

well, I can't help you there, I never used precompiled headers on linux, neither on windows...

SuperMegaMau

09-01-2007 16:04:27

I'm trying to build the new cvs version of paging landscape to use this new Decals thing, but I'm getting this new error...

*** Warning: Linking the executable PagingLandScape2 against the loadable module
*** Plugin_PagingLandScape2.so is not portable!
g++ -g -O2 -o .libs/PagingLandScape2 PagingLandScape.o ../../../PlugIns/PagingLandScape2/src/.libs/Plugin_PagingLandScape2.so /usr/lib/libOgreMain.so /usr/lib/libfreetype.so /usr/lib/libzzip.so -lCg -L/var/tmp/portage/devil-1.6.7-r1/work/DevIL-1.6.7/src-IL/src -lpthread /usr/lib/libILU.so /usr/lib/libIL.so /usr/lib/libpng12.so /usr/lib/libjpeg.so -lz -lm -ldl -Wl,--rpath -Wl,/usr/lib/OGRE
../../../PlugIns/PagingLandScape2/src/.libs/Plugin_PagingLandScape2.so: undefined reference to `vtable for Ogre::PagingLandScapeMeshDecalFactory'
collect2: ld returned 1 exit status


any idea?

Game_Ender

09-01-2007 17:14:54

The undefined vtable reference usually means there is a virtual function declared for a class but no implemented. Just do a quick comparison of the header and cpp files.

Precompilied headers for gcc and this nice article on using them you have probably already read.

SuperMegaMau

09-01-2007 19:28:30

ok, I just compared the files where the PagingLandScapeMeshDecalFactory class is defined, no problems found. About the precompiled headers, what I understood reading those docs is that I'm building this code using the precompiled headers, If the programer uses them, I must be using them too. I tryed to undefine the PRECOMPILED_HEADERS define and nothing works then.

So I'm kind of lost right now...

sklug

10-01-2007 03:55:41

Is OgrePagingLandScapeMeshDecal.o actually being linked into the .so file? I'm not running linux here.

Ahh, looking at the Makefile.am in the src dir, I didn't not update this with my patch. I'll submit another patch, but in the meantime, just add OgrePagingLandScapeMeshDecal.cpp to the list of sources.

Apologies!

sklug

SuperMegaMau

10-01-2007 10:16:46

that's it...