Problem building on Linux

Calder

03-05-2009 14:49:46

After looking into the PagedGeometry plugin, I'd really love to try it out, but when I try to build it I get the following error, (at the bottom):

calder@divvy:~/Desktop/PagedGeometry$ cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.6)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/calder/Desktop/PagedGeometry
calder@divvy:~/Desktop/PagedGeometry$ make
Scanning dependencies of target PagedGeometry
[ 6%] Building CXX object source/CMakeFiles/PagedGeometry.dir/BatchedGeometry.o
[ 12%] Building CXX object source/CMakeFiles/PagedGeometry.dir/BatchPage.o
[ 18%] Building CXX object source/CMakeFiles/PagedGeometry.dir/GrassLoader.o
In file included from /home/calder/Desktop/PagedGeometry/source/GrassLoader.cpp:11:
/home/calder/Desktop/PagedGeometry/source/../include/GrassLoader.h:184: error: extra qualification ‘Forests::GrassLoader::’ on member ‘generateGrass_QUAD’
/home/calder/Desktop/PagedGeometry/source/../include/GrassLoader.h:185: error: extra qualification ‘Forests::GrassLoader::’ on member ‘generateGrass_CROSSQUADS’
/home/calder/Desktop/PagedGeometry/source/../include/GrassLoader.h:186: error: extra qualification ‘Forests::GrassLoader::’ on member ‘generateGrass_SPRITE’
make[2]: *** [source/CMakeFiles/PagedGeometry.dir/GrassLoader.o] Error 1
make[1]: *** [source/CMakeFiles/PagedGeometry.dir/all] Error 2
make: *** [all] Error 2


I'm using the 1.05 Linux SDK, by the way. Thanks in advance for any help!

-Calder

dermont

04-05-2009 06:50:36

Normally extra qualification errors are pretty self explanatory, you just need to update the GrassLoader.h helper functions to:


//Helper functions
Ogre::Mesh *generateGrass_QUAD(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount);
Ogre::Mesh *generateGrass_CROSSQUADS(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount);
Ogre::Mesh *generateGrass_SPRITE(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount);

Calder

04-05-2009 13:13:09

Sorry to bother you with that error, then. I hope this one isn't as obvious:

[ 25%] Building CXX object source/CMakeFiles/PagedGeometry.dir/ImpostorPage.o
In file included from /home/calder/Desktop/PagedGeometry/source/../include/ImpostorPage.h:20,
from /home/calder/Desktop/PagedGeometry/source/ImpostorPage.cpp:16:
/home/calder/Desktop/PagedGeometry/source/../include/StaticBillboardSet.h:63: warning: ‘typedef’ was ignored in this declaration
In file included from /home/calder/Desktop/PagedGeometry/source/ImpostorPage.cpp:16:
/home/calder/Desktop/PagedGeometry/source/../include/ImpostorPage.h:40: warning: ‘typedef’ was ignored in this declaration
/home/calder/Desktop/PagedGeometry/source/../include/ImpostorPage.h:326: error: ISO C++ forbids declaration of ‘auto_ptr’ with no type
/home/calder/Desktop/PagedGeometry/source/../include/ImpostorPage.h:326: error: invalid use of ‘::’
/home/calder/Desktop/PagedGeometry/source/../include/ImpostorPage.h:326: error: expected ‘;’ before ‘<’ token
/home/calder/Desktop/PagedGeometry/source/ImpostorPage.cpp: In constructor ‘Forests::ImpostorTexture::ImpostorTexture(Forests::ImpostorPage*, Ogre::Entity*)’:
/home/calder/Desktop/PagedGeometry/source/ImpostorPage.cpp:320: error: class ‘Forests::ImpostorTexture’ does not have any field named ‘loader’
/home/calder/Desktop/PagedGeometry/source/ImpostorPage.cpp: In member function ‘void Forests::ImpostorTexture::renderTextures(bool)’:
/home/calder/Desktop/PagedGeometry/source/ImpostorPage.cpp:453: error: ‘loader’ was not declared in this scope
make[2]: *** [source/CMakeFiles/PagedGeometry.dir/ImpostorPage.o] Error 1
make[1]: *** [source/CMakeFiles/PagedGeometry.dir/all] Error 2
make: *** [all] Error 2

dermont

04-05-2009 13:51:32

Sorry to bother you with that error, then. I hope this one isn't as obvious:
That's ok, the error is probably only obvious after you've encountered it a few times.

For the 'typedef' warnings you can remove the typedefs before the enums i.e. ''typedef enum' to 'enum'. For the ‘auto_ptr’ error I think you make be missing a header try updating ImposterPage.h:

#include <memory>

Calder

04-05-2009 17:02:32

Yey, it works now! Thanks so much for all the help! I can't wait to start using PagedGeometry.

tdev

29-06-2009 11:48:04

merged the include memory fix :)