[solved]Compiling error in CEGUIString.h

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
jacmoe
Just can't stay away
Just can't stay away
Posts: 136
Joined: Sun Apr 03, 2005 14:18
Location: Holbaek, Denmark
Contact:

Re: Compiling error in CEGUIString.h

Postby jacmoe » Sun May 17, 2009 00:22

I can't see any errors.
Could be a typo in your other files. It most often is.
However, I load TaharezLookSkin.scheme, instead of TaharezLook.scheme. That's the only obvious difference.. :|

Hedgehog
Just popping in
Just popping in
Posts: 13
Joined: Sat Apr 18, 2009 13:22

Re: Compiling error in CEGUIString.h

Postby Hedgehog » Sun May 17, 2009 13:22

I am quite sure its not a typo, because when I comment out all that has to do with CEGUI and the frame listener, I get it to run just fine.

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

Re: Compiling error in CEGUIString.h

Postby CrazyEddie » Sun May 17, 2009 14:43

You might try adding:

Code: Select all

#define NOMINMAX

prior to any line that includes any Win32 headers (watch out for where they may get implicitly included), or move your lines that undefine min/max to be after the Win32 includes but before any others.

Hedgehog
Just popping in
Just popping in
Posts: 13
Joined: Sat Apr 18, 2009 13:22

Re: Compiling error in CEGUIString.h

Postby Hedgehog » Sun May 17, 2009 17:03

Nope...

Nothing seems to help.

Tried defining it in the code where you said, I even tried defining it in the preprossesor. No change.

I'm just about to give up.

earthsruler
Quite a regular
Quite a regular
Posts: 74
Joined: Mon Apr 28, 2008 23:21
Location: Australia

Re: Compiling error in CEGUIString.h

Postby earthsruler » Mon May 18, 2009 00:35

1>herbert_game.cpp
1>c:\ogresdk\include\cegui\ceguistring.h(644) : error C2059: syntax error : 'constant'
1>c:\ogresdk\include\cegui\ceguistring.h(645) : error C2334: unexpected token(s) preceding '{'; skipping


When I get strange errors in files that should be fine I blame the file before it. herbert_game.cpp was getting compiled when the errors were thrown so look there. Check for missing semi-colons especially on the ends of classes.

Also under project settings check what character set you are using. If its not "Not set", try compiling with that setting to see what happens.

You might try adding:

Code: Select all

#define NOMINMAX


prior to any line that includes any Win32 headers (watch out for where they may get implicitly included), or move your lines that undefine min/max to be after the Win32 includes but before any others.


Awesome suggestion. I've been burnt by this before and if you don't know about it, it can be a time vortex...

ER.

Hedgehog
Just popping in
Just popping in
Posts: 13
Joined: Sat Apr 18, 2009 13:22

Re: Compiling error in CEGUIString.h

Postby Hedgehog » Mon May 18, 2009 00:58

Okey after what earthsruler said I began moving the includes around, just to see what would happen :p.

When i moved

Code: Select all

#include <CEGUI/CEGUI.h>
#include <CEGUI/CEGUISystem.h>
#include <CEGUI/CEGUISchemeManager.h>
#include <OgreCEGUIRenderer.h>


into the herbert_game.h file all of a sudden everything compiled perfectly.

My troubles are finally over. Thanks for all the help, I really appreciate it.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 14 guests