Got some build problems with the Base Application

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
rennurb3000
Gnoblar
Posts: 1
Joined: Wed Nov 12, 2014 10:14 pm

Got some build problems with the Base Application

Post by rennurb3000 »

Hello Ogre Community!
I started using ogre today and i am totally exited about it,
but i am stuck setting up a new Application :(

I am using Ubuntu 14.04 64bit and code blocks

I downloaded Ogre 1.9 RC from Sourceforge and was able to build it from source
with cmake as shown in the description

i tried libogre-dev from ubuntu, but for some reason it did not work with cmake (issues with freetype.. i don`t know..)
so i gave building it a try and i got a "seems to be working better" ogre installation

http://www.ogre3d.org/tikiwiki/tiki-ind ... With+CMake

I tried the convienient all in one package wich gave me this output

Code: Select all

The C compiler identification is GNU 4.8.2
The CXX compiler identification is GNU 4.8.2
Check for working C compiler: /usr/bin/cc
Check for working C compiler: /usr/bin/cc -- 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
CMake Warning (dev) in CMakeLists.txt:
  A logical block opening on the line

    /home/thomas/Dokumente/Ogre/clean_ogre_cmake_project/CMakeLists.txt:29 (if)

  closes on the line

    /home/thomas/Dokumente/Ogre/clean_ogre_cmake_project/CMakeLists.txt:41 (endif)

  with mis-matching arguments.
This warning is for project developers.  Use -Wno-dev to suppress it.

The C compiler identification is GNU 4.8.2
The CXX compiler identification is GNU 4.8.2
Check for working C compiler: /usr/bin/cc
Check for working C compiler: /usr/bin/cc -- 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
CMake Warning (dev) in CMakeLists.txt:
  A logical block opening on the line

    /home/thomas/Dokumente/Ogre/clean_ogre_cmake_project/CMakeLists.txt:29 (if)

  closes on the line

    /home/thomas/Dokumente/Ogre/clean_ogre_cmake_project/CMakeLists.txt:41 (endif)

  with mis-matching arguments.
This warning is for project developers.  Use -Wno-dev to suppress it.

Looking for OGRE...
OGRE_PREFIX_WATCH changed.
Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
checking for module 'OGRE'
  found OGRE, version 1.9.0unstable
Found Ogre Ghadamon (1.9.0)
Found OGRE: optimized;/usr/local/lib/libOgreMain.so;debug;/usr/local/lib/libOgreMain.so
Looking for OGRE_Paging...
Found OGRE_Paging: optimized;/usr/local/lib/libOgrePaging.so;debug;/usr/local/lib/libOgrePaging.so
Looking for OGRE_Terrain...
Found OGRE_Terrain: optimized;/usr/local/lib/libOgreTerrain.so;debug;/usr/local/lib/libOgreTerrain.so
Looking for OGRE_Property...
Found OGRE_Property: optimized;/usr/local/lib/libOgreProperty.so;debug;/usr/local/lib/libOgreProperty.so
Looking for OGRE_RTShaderSystem...
Found OGRE_RTShaderSystem: optimized;/usr/local/lib/libOgreRTShaderSystem.so;debug;/usr/local/lib/libOgreRTShaderSystem.so
Looking for OGRE_Volume...
Found OGRE_Volume: optimized;/usr/local/lib/libOgreVolume.so;debug;/usr/local/lib/libOgreVolume.so
Looking for OGRE_Overlay...
Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
Looking for OIS...
OIS_PREFIX_PATH changed.
checking for module 'OIS'
  found OIS, version 1.3.0
Found OIS: optimized;/usr/lib/x86_64-linux-gnu/libOIS.so;debug;/usr/lib/x86_64-linux-gnu/libOIS.so
Configuring done
So i played a little arround and looked through various forums

then i tried the source and header files for linux from
http://www.ogre3d.org/tikiwiki/tiki-ind ... +Framework
where cmake could actually make me a code blocks program

I opened it and tried compiling it...
but i got some compiler errors from OgreFontManager.h and OgreResourceManager.h

Code: Select all

||=== Build: all in OgreApp (compiler: GNU GCC Compiler) ===|
/usr/include/OGRE/Overlay/OgreFontManager.h|53|error: invalid covariant return type for ‘virtual Ogre::FontPtr Ogre::FontManager::create(const String&, const String&, bool, Ogre::ManualResourceLoader*, const NameValuePairList*)’|
/usr/local/include/OGRE/OgreResourceManager.h|100|error:   overriding ‘virtual Ogre::ResourcePtr Ogre::ResourceManager::create(const String&, const String&, bool, Ogre::ManualResourceLoader*, const NameValuePairList*)’|
/usr/include/OGRE/Overlay/OgreFontManager.h|59|error: invalid covariant return type for ‘virtual Ogre::FontPtr Ogre::FontManager::getByName(const String&, const String&)’|
/usr/local/include/OGRE/OgreResourceManager.h|303|error:   overriding ‘virtual Ogre::ResourcePtr Ogre::ResourceManager::getByName(const String&, const String&)’|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|
I was more or less expecting some issues with either the CMakeLists and the example framework source files,
but from the Scenemanager.h file??

thanks in advance for your help,
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Got some build problems with the Base Application

Post by Kojack »

rennurb3000 wrote:I downloaded Ogre 1.9 RC from Sourceforge and was able to build it from source
with cmake as shown in the description
Ogre 1.9 went from RC to stable a year ago, so that source is a little out of date. The best place to get it from is the official bitbucket repo: https://bitbucket.org/sinbad/ogre

(i've never built ogre in ubuntu (or any linux distro) so i can't help much with that)
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Got some build problems with the Base Application

Post by frostbyte »

tip...
i found out long time ago that for small projects creating the project manualy myself can be faster then fighting cmake scripts/problems...
so you can use the 1.9 updated prebuild dev package for linux and build the project yourself...
btw: i dont see any need for free-type for this project- but i may be wrong somehow....
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Got some build problems with the Base Application

Post by Kojack »

frostbyte wrote:btw: i dont see any need for free-type for this project- but i may be wrong somehow....
Freetype is used by the overlay component (for font rendering).
dygufa
Gnoblar
Posts: 1
Joined: Fri Feb 21, 2014 7:34 pm

Re: Got some build problems with the Base Application

Post by dygufa »

I have a similar issue, did you find how to fix that?
jauthu
Gnoblar
Posts: 15
Joined: Fri Apr 22, 2011 11:06 pm
x 1

Re: Got some build problems with the Base Application

Post by jauthu »

First you have to try building and installing Ogre 1.9 by getting it from here:

https://bitbucket.org/sinbad/ogre/get/v1-9-0.tar.bz2

Ubuntu 14.04 GCC version is gcc-4.8.2. I have successfully built Ogre 1.9 with gcc-4.8.2 so it should be okay there.

The second thing is that those cmake warnings in your first quote are not really a problem -- in the end OGRE was found and the project should work.

Here is how to remove the warning:

Code: Select all

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,9 +36,9 @@ if(UNIX)
          set(CMAKE_MODULE_PATH "/usr/lib/OGRE/cmake/;${CMAKE_MODULE_PATH}")
          set(OGRE_SAMPLES_INCLUDEPATH "/usr/share/OGRE/samples/Common/include/") # Otherwise,
 
-       else ()
+       else (EXISTS "/usr/local/lib/OGRE/cmake")
          message(SEND_ERROR "Failed to find module path.")
-       endif(EXISTS "/usr/local/lib/OGRE")
+       endif(EXISTS "/usr/local/lib/OGRE/cmake")
 endif(UNIX)
  
 if (CMAKE_BUILD_TYPE STREQUAL "")
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Got some build problems with the Base Application

Post by frostbyte »

reading this again...it sounds like freetype version that ogre was build with is different from the one that is linked/refered by your project...
i think i recall reading something about this minor freetype version change in a mingw related thread...
try to check the code-blocks headers/libs path to see where they lead...
just to make sure...
on your code-blocks project add a "full path" header to the freetype "include dir" that orge was build with...
make sure it is the first on the list( move it up if needed... )
do the same with freetype lib...( full path+move up to be the first on the list... )
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
Post Reply