Page 1 of 1

0.8 repo: String.h on Windows

Posted: Sun Jan 01, 2012 02:26
by Dekker3D
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.

Re: 0.8 repo: String.h on Windows

Posted: Sun Jan 01, 2012 10:03
by CrazyEddie
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 :)

Re: 0.8 repo: String.h on Windows

Posted: Mon Aug 05, 2013 20:01
by JordanWeber
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"

Re: 0.8 repo: String.h on Windows

Posted: Mon Aug 05, 2013 20:33
by CrazyEddie
Nice necro. And if you've had to do what you describe, you've done something else horribly wrong.

(Topic locked due to necro)