[solved] Compiling PLSM2 against Ogre 1.4.9 on Ubuntu 8.04

tudhalyas

04-09-2008 17:53:27

Hi guys!

I have a problem with the compilation of PLSM2 against Ogre 1.4.9 on Ubuntu 8.04 (AMD64 architecture): it seems that g++ can't find the "OgreOctreeSceneManager.h" header file.

Here's the g++ shell output:

g++ -DHAVE_CONFIG_H -I. -I../../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I../../../PlugIns/PagingLandScape2/include -g -O2 -MT Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSphereSceneQuery.lo -MD -MP -MF .deps/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSphereSceneQuery.Tpo -c OgrePagingLandScapeOctreeSphereSceneQuery.cpp -o Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSphereSceneQuery.o >/dev/null 2>&1
mv -f .deps/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSphereSceneQuery.Tpo .deps/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSphereSceneQuery.Plo
/bin/bash ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I../../../PlugIns/PagingLandScape2/include -g -O2 -MT Plugin_PagingLandScape2_la-OgrePagingLandScapeAxisAlignedBoxSceneQuery.lo -MD -MP -MF .deps/Plugin_PagingLandScape2_la-OgrePagingLandScapeAxisAlignedBoxSceneQuery.Tpo -c -o Plugin_PagingLandScape2_la-OgrePagingLandScapeAxisAlignedBoxSceneQuery.lo `test -f 'OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp' || echo './'`OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp
g++ -DHAVE_CONFIG_H -I. -I../../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I../../../PlugIns/PagingLandScape2/include -g -O2 -MT Plugin_PagingLandScape2_la-OgrePagingLandScapeAxisAlignedBoxSceneQuery.lo -MD -MP -MF .deps/Plugin_PagingLandScape2_la-OgrePagingLandScapeAxisAlignedBoxSceneQuery.Tpo -c OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp -fPIC -DPIC -o .libs/Plugin_PagingLandScape2_la-OgrePagingLandScapeAxisAlignedBoxSceneQuery.o
In file included from OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:40:
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapeSceneManager.h:24:37: error: OgreOctreeSceneManager.h: Nessun file o directory
In file included from OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:40:
../../../PlugIns/PagingLandScape2/include/OgrePagingLandScapeSceneManager.h:62: error: expected class-name before ‘{’ token
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp: In member function ‘virtual void Ogre::PagingLandScapeAxisAlignedBoxSceneQuery::execute(Ogre::SceneQueryListener*)’:
OgrePagingLandScapeAxisAlignedBoxSceneQuery.cpp:490: error: invalid static_cast from type ‘Ogre::SceneManager*’ to type ‘Ogre::PagingLandScapeSceneManager*’
make[4]: *** [Plugin_PagingLandScape2_la-OgrePagingLandScapeAxisAlignedBoxSceneQuery.lo] Error 1
make[4]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/paginglandscape/PlugIns/PagingLandScape2/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/paginglandscape/PlugIns/PagingLandScape2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/paginglandscape/PlugIns'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/paginglandscape'
make: *** [all] Error 2

(sorry for any line in Italian...)

The static and dynamic libraries of the OctreeSceneManager plugins are present under the /usr/local/lib/OGRE directory...

tudhalyas@gondor:/usr/local/lib/OGRE$ ls -l
-rwxr-xr-x 1 root root 1362 2008-07-22 18:00 Plugin_BSPSceneManager.la
-rwxr-xr-x 1 root root 274656 2008-07-22 18:00 Plugin_BSPSceneManager.so
-rwxr-xr-x 1 root root 1368 2008-07-22 18:00 Plugin_CgProgramManager.la
-rwxr-xr-x 1 root root 83520 2008-07-22 18:00 Plugin_CgProgramManager.so
-rwxr-xr-x 1 root root 1441 2008-07-22 18:00 Plugin_EXRCodec.la
-rwxr-xr-x 1 root root 34760 2008-07-22 18:00 Plugin_EXRCodec.so
-rwxr-xr-x 1 root root 1380 2008-07-22 18:00 Plugin_OctreeSceneManager.la
-rwxr-xr-x 1 root root 345984 2008-07-22 18:00 Plugin_OctreeSceneManager.so
-rwxr-xr-x 1 root root 1332 2008-07-22 18:00 Plugin_ParticleFX.la
-rwxr-xr-x 1 root root 275120 2008-07-22 18:00 Plugin_ParticleFX.so
-rwxr-xr-x 1 root root 1357 2008-07-22 18:00 RenderSystem_GL.la
-rwxr-xr-x 1 root root 883784 2008-07-22 18:00 RenderSystem_GL.so

...but it seems that PLSM doesn't care about them. I asked on the main Ogre forum if OgreOctreeSceneManager.h should go into the /usr/local/OGRE directory, but they said it should not. I don't know what to do... can someone help me, please? :?

Thank you!!!

ttvn

06-09-2008 03:19:32

I didn't use Ubuntu but I tried on linux AMD64. If you compiled Ogre from its source, the "make install" won't copy over OgreOctreeSceneManager.h etc. because your Ogre application won't need those. But compiling PLSM2 from source does need that header.

You may either copy the header over manually, or probably just add -D_PLSM_OCTREE to Makefile (see http://www.ogre3d.org/phpBB2addons/view ... 8864dd8326).

tudhalyas

06-09-2008 07:17:44

I didn't use Ubuntu but I tried on linux AMD64. If you compiled Ogre from its source, the "make install" won't copy over OgreOctreeSceneManager.h etc. because your Ogre application won't need those. But compiling PLSM2 from source does need that header.

You may either copy the header over manually, or probably just add -D_PLSM_OCTREE to Makefile (see http://www.ogre3d.org/phpBB2addons/view ... 8864dd8326).

Thanks so much for your answer! I'll try this out and let you know how it went! :wink:

tudhalyas

06-09-2008 11:40:02

It worked!!!! Thanks again! ;-)