[BUG & FIX] Compiling 0.7.5 with GCC 4.6.0 ptrdiff_t

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

KishukuOni
Not too shy to talk
Not too shy to talk
Posts: 25
Joined: Wed Nov 25, 2009 17:41

[BUG & FIX] Compiling 0.7.5 with GCC 4.6.0 ptrdiff_t

Postby KishukuOni » Wed Apr 20, 2011 22:44

I just upgraded to GCC 4.6.0 and ran into this issue when compiling CEGUI 0.7.5.
This may be in other versions, but I don't know.
The compiler error was:

Code: Select all

../../cegui/include/CEGUIString.h:68:11: error: 'ptrdiff_t' does not name a type


It seems GNU moved some header includes around at some point.
Anyway, all I did to fix it was to add #include <cstddef> to the list of included headers in CEGUIString.h

This is pretty simple but just wanted to post this in case anyone else ran into the same problem.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [BUG & FIX] Compiling 0.7.5 with GCC 4.6.0 ptrdiff_t

Postby CrazyEddie » Thu Apr 21, 2011 08:23

Thanks for the heads up. I will make sure it's addressed :)

CE.

EventHorizon
Just popping in
Just popping in
Posts: 1
Joined: Tue Aug 23, 2011 23:33

Re: [BUG & FIX] Compiling 0.7.5 with GCC 4.6.0 ptrdiff_t

Postby EventHorizon » Tue Aug 23, 2011 23:39

I just encountered this same error - ubuntu 11.10 using cegui 0.7.5

cd ~/src/CEGUI-0.7.5/
./configure --with-gtk2 --with-boost-python
make
...
In file included from ../../cegui/include/CEGUIAffector.h:33:0,
from CEGUIAffector.cpp:30:
../../cegui/include/CEGUIString.h:65:11: error: 'ptrdiff_t' does not name a type

I can confirm your fix worked for me as well. Thanks KishukuOni

cheers Scott


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest