Error while building application using Ogre 2.0

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
koreos
Halfling
Posts: 43
Joined: Fri Jun 20, 2014 7:05 pm

Error while building application using Ogre 2.0

Post by koreos »

I am using Ogre 2.0 unstable version.
I have application which is running fine on Ogre 1.8 but while building the same application on Ogre 2.0 I am getting following errors
I am building application in ubuntu using codeblocks. I tried with CMakeLists.txt of both Ogre1.8 and for >=Ogre1.9

Code: Select all

||=== Build: all in OgreApp (compiler: GNU GCC Compiler) ===|
/usr/local/include/OGRE/SdkTrays.h|97|error: ‘DisplayString’ in namespace ‘Ogre’ does not name a type|
/usr/local/include/OGRE/SdkTrays.h|97|error: ISO C++ forbids declaration of ‘message’ with no type [-fpermissive]|
/usr/local/include/OGRE/SdkTrays.h|98|error: ‘DisplayString’ in namespace ‘Ogre’ does not name a type|
/usr/local/include/OGRE/SdkTrays.h|98|error: ISO C++ forbids declaration of ‘question’ with no type [-fpermissive]|
/usr/local/include/OGRE/SdkTrays.h|182|error: ‘DisplayString’ in namespace ‘Ogre’ does not name a type|
/usr/local/include/OGRE/SdkTrays.h|182|error: ISO C++ forbids declaration of ‘caption’ with no type [-fpermissive]|
/usr/local/include/OGRE/SdkTrays.h|182|error: ‘Ogre::TextAreaOverlayElement’ has not been declared|
/usr/local/include/OGRE/SdkTrays.h|207|error: ‘DisplayString’ in namespace ‘Ogre’ does not name a type|
/usr/local/include/OGRE/SdkTrays.h|207|error: ISO C++ forbids declaration of ‘caption’ with no type [-fpermissive]|
/usr/local/include/OGRE/SdkTrays.h|207|error: ‘Ogre::TextAreaOverlayElement’ has not been declared|
/usr/local/include/OGRE/SdkTrays.h|129|error: cannot dynamic_cast ‘element’ (of type ‘class Ogre::OverlayElement*’) to type ‘class Ogre::OverlayContainer*’ (target is not pointer or reference to complete type)|
/usr/local/include/OGRE/SdkTrays.h|134|error: incomplete type ‘Ogre::OverlayContainer’ used in nested name specifier|
/usr/local/include/OGRE/SdkTrays.h|134|error: expected ‘;’ before ‘children’|
/usr/local/include/OGRE/SdkTrays.h|135|error: ‘children’ was not declared in this scope|
/usr/local/include/OGRE/SdkTrays.h|147|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|148|error: invalid use of incomplete type ‘class Ogre::OverlayContainer’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|40|error: forward declaration of ‘class Ogre::OverlayContainer’|
/usr/local/include/OGRE/SdkTrays.h|148|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|149|error: incomplete type ‘Ogre::OverlayManager’ used in nested name specifier|
/usr/local/include/OGRE/SdkTrays.h|158|error: incomplete type ‘Ogre::OverlayManager’ used in nested name specifier|
/usr/local/include/OGRE/SdkTrays.h|159|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|159|error: invalid use of incomplete type ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|43|error: forward declaration of ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/SdkTrays.h|160|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|160|error: invalid use of incomplete type ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|43|error: forward declaration of ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/SdkTrays.h|161|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|162|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|174|error: incomplete type ‘Ogre::OverlayManager’ used in nested name specifier|
/usr/local/include/OGRE/SdkTrays.h|175|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|175|error: invalid use of incomplete type ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|43|error: forward declaration of ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/SdkTrays.h|175|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|176|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|176|error: invalid use of incomplete type ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|43|error: forward declaration of ‘class Ogre::OverlayManager’|
/usr/local/include/OGRE/SdkTrays.h|176|error: invalid use of incomplete type ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/Overlay/OgreOverlayPrerequisites.h|41|error: forward declaration of ‘class Ogre::OverlayElement’|
/usr/local/include/OGRE/SdkTrays.h|184|error: incomplete type ‘Ogre::FontManager’ used in nested name specifier|
/usr/local/include/OGRE/SdkTrays.h|184|error: request for member ‘getFontName’ in ‘* area’, which is of non-class type ‘int’|
/usr/local/include/OGRE/SdkTrays.h|48|error: request for member ‘asUTF8’ in ‘caption’, which is of non-class type ‘const int’|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 10 second(s)) ===|
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Error while building application using Ogre 2.0

Post by dark_sylinc »

You're missing including a couple headers in one of your cpp files (or h files).

In Ogre 1.9 Ovarlays were split from Core into a separate component. So you need to include that component's folders as include location and also add the library path.

The compiler is telling you that classes like DisplayString and TextAreaOverlayElement have not been defined nor forward declared.
Look at the sample browser's code to see the includes needed.
Post Reply