can't compile clean_ogre_cmake_project (1.9)

Problems building or running the engine, queries about how to use features etc.
Post Reply
BPiek
Gnoblar
Posts: 4
Joined: Sun Sep 07, 2014 7:29 pm

can't compile clean_ogre_cmake_project (1.9)

Post by BPiek »

Hi, while tryng to compile i get errors:
http://pastebin.com/EQn7LmHJ

I've searched internet for an answer but could not find proper one. I am using the project for ogre 1.9. I've tried to include OgreOverlay.h but that changes nothing.
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: can't compile clean_ogre_cmake_project (1.9)

Post by Transporter »

You have to include OgreOverlaySystem.h, too.

Code: Select all

#include <Ogre.h>
#include <OgreOverlay.h>
#include <OgreOverlaySystem.h>
User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 38

Re: can't compile clean_ogre_cmake_project (1.9)

Post by Herb »

Once the compile errors are corrected, unless you have the overlay lib in your link path, you'll get linker errors. So, make sure you're linking against the overlay component (just like you'd link to the terrain component if you wanted terrain).
BPiek
Gnoblar
Posts: 4
Joined: Sun Sep 07, 2014 7:29 pm

Re: can't compile clean_ogre_cmake_project (1.9)

Post by BPiek »

i've added :

Code: Select all

link_directories(/usr/local/lib/ /usr/local/lib/OGRE)
and i have:

Code: Select all

target_link_libraries(OgreApp ${OGRE_LIBRARIES} ${OIS_LIBRARIES} ${OGRE_Overlay_LIBRARIES})
I got an error:

Code: Select all

/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h:45:29: error: conflicting declaration 'typedef class Ogre::SharedPtr<Ogre::Font> Ogre::FontPtr'
     typedef SharedPtr<Font> FontPtr;
(...)
OgreFont.h:425:20: error: 'class Ogre::FontPtr' has a previous declaration as 'class Ogre::FontPtr'
I've installed previously OGRE 1.7 but headers should be overwriten when building and installing from source, right? So what is the issue now, can some1 tell me?
Post Reply