GCC Compile error with v1-8 [SOLVED]

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
merlinblack
Goblin
Posts: 224
Joined: Thu Mar 15, 2007 10:05 am
Location: Sydney, Australia
x 7

GCC Compile error with v1-8 [SOLVED]

Post by merlinblack »

After updating my copy of ogre I found there is a compile error in OgreImage.cpp which is easily fixed by adding

Code: Select all

#include <OgreMath.h>
What struck me as odd, was that it looks like it might have been like that for a little while. :shock: Is it working for everyone else without the include?

This seems to only affect v1-8. I'm using GNU gcc 4.6.1 on Ubuntu Linux.

Here are the errors:

Code: Select all

/home/nigel/prog/ogre/OgreMain/src/OgreImage.cpp: In static member function ‘static void Ogre::Image::applyGamma(Ogre::uchar*, Ogre::Real, size_t, Ogre::uchar)’:
/home/nigel/prog/ogre/OgreMain/src/OgreImage.cpp:557:13: error: incomplete type ‘Ogre::Math’ used in nested name specifier
/home/nigel/prog/ogre/OgreMain/src/OgreImage.cpp:558:13: error: incomplete type ‘Ogre::Math’ used in nested name specifier
/home/nigel/prog/ogre/OgreMain/src/OgreImage.cpp:559:13: error: incomplete type ‘Ogre::Math’ used in nested name specifier
I would send a patch - however I don't have access to a scanner or fax to do the contributor form at the moment.

Merry Christmas if you celebrate it!
Last edited by merlinblack on Mon Dec 19, 2011 11:29 pm, edited 1 time in total.
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Image
User avatar
Shockeye
Gremlin
Posts: 154
Joined: Mon Nov 24, 2008 10:34 am
Location: 'Straya
x 1

Re: GCC Compile error with v1-8

Post by Shockeye »

I had the same problem, compiling on Ubuntu. But no problems on Windows (VC2008) :?
I wonder if there is a gcc compiler flag that would make a difference?
(I've only just start experimenting with Linux, so I haven't a clue...) :)
User avatar
merlinblack
Goblin
Posts: 224
Joined: Thu Mar 15, 2007 10:05 am
Location: Sydney, Australia
x 7

Re: GCC Compile error with v1-8 [SOLVED]

Post by merlinblack »

My hunch is that there isn't a flag you can tweak, since this is an error rather than a warning. I wonder if it is GCC in general or just this version. I'll try it on OSX10.6 and see what happens.

I must have only narrowly missed your post while searching! :?

EDIT: According to my twitter feed, David has patched it. Thanks!
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Image
JDongian
Gnoblar
Posts: 3
Joined: Sat Jan 16, 2016 8:54 am

Re: GCC Compile error with v1-8 [SOLVED]

Post by JDongian »

I'm quite sure this isn't fixed yet, as when I was building 1.8 recently on Arch Linux, I ran into this issue and needed to add the #include manually myself.