0.8 repo: String.h on Windows

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

Dekker3D
Just popping in
Just popping in
Posts: 3
Joined: Sun Aug 15, 2010 09:44

0.8 repo: String.h on Windows

Postby Dekker3D » Sun Jan 01, 2012 02:26

Hey all,

I pulled a CEGUI 0.8 off the repo not too long ago, and managed to compile it with managable levels of trouble (I needed the OgreRenderer). Now, I seem to have a problem. CEGUI's headers include String.h (note the capital letter, which Windows doesn't give a *bleep* about), which includes string.h (note the lack of capital letter, which-... yeah), like so many other headers. So, whenever #include "string.h" was used, one of them would have to be chosen. I got the wrong side of the stick, and every single thing in my whole STL header collection b0rked. Hard. So yeah. It'd be nice to your Windows-using fans to rename it to something other than (case-insensitively) string.h.

Needless to say, having an STL header replaced with a CEGUI one somewhere, and having all other STL headers that require it suddenly go "waitwhut", caused me quite a headache. I'm hoping the same won't happen to anybody else.

That said, I do appreciate the work you folks do. A lot.

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

Re: 0.8 repo: String.h on Windows

Postby CrazyEddie » Sun Jan 01, 2012 10:03

One the one hand, I can kind of acknowledge what has happened here, though on the other hand, the correct search path to add to your compiler is now to the directory 'one up', so all cegui include statements have the CEGUI directory prefix. If this is done correctly, it should never pick up a wrong header (a fact supported by the fact that CEGUI itself builds).

So basically:
Fix the search path, and then change include statements such that:

Code: Select all

#include <CEGUIString.h>

becomes:

Code: Select all

#include <CEGUI/String.h>


CE

PS. I take responsibility for the fact that this change is not described on the porting page. Hopefully I will get around to adding that before 0.8.0 is released - unless someone else would like to add a note on there about it :)

JordanWeber
Just popping in
Just popping in
Posts: 2
Joined: Mon Apr 01, 2013 12:25

Re: 0.8 repo: String.h on Windows

Postby JordanWeber » Mon Aug 05, 2013 20:01

I had to do the following in all CEGUI source to avoid this error:

Rename the CEGUI source "String.h" to "CEGUIString.h"

Replace all:
CEGUI/String.h
with
CEGUI/CEGUIString.h

"../String.h"
with
"../CEGUIString.h"

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

Re: 0.8 repo: String.h on Windows

Postby CrazyEddie » Mon Aug 05, 2013 20:33

Nice necro. And if you've had to do what you describe, you've done something else horribly wrong.

(Topic locked due to necro)


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 0 guests