Errors compiling when getting started

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
christopher
Posts: 2
Joined: Mon Oct 15, 2007 7:08 pm

Errors compiling when getting started

Post by christopher »

I am using Visual C++ 2005.

I have included the path to this in my project settings
\irrlicht-1.4beta\lib\Win32-visualstudio\

and this
\irrlicht-1.4beta\include\

My code looks like this (just to see if it is linked ok)

Code: Select all

#include "irrlicht.h"

using namespace irr;
using namespace core;
using namespace video;
using namespace gui;
using namespace io;
using namespace scene;
The compiler errors I get are
irrMath.h(39) : warning C4091: '' : ignored on left of 'const float' when no variable is declared
irrMath.h(39) : error C2143: syntax error : missing ';' before 'constant'
irrMath.h(39) : error C2059: syntax error : 'constant'
irrMath.h(45) : warning C4091: '' : ignored on left of 'const float' when no variable is declared
irrMath.h(45) : error C2143: syntax error : missing ';' before 'constant'
irrMath.h(45) : error C2059: syntax error : 'constant'
SColor.h(524) : error C2589: 'constant' : illegal token on right side of '::'
SColor.h(524) : error C2059: syntax error : '::'
SColor.h(525) : error C2589: 'constant' : illegal token on right side of '::'
SColor.h(528) : error C2589: 'constant' : illegal token on right side of '::'
SColor.h(528) : error C2059: syntax error : '::'
Any ideas?
Thanks
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

It looks like you've got another definition of PI - maybe an empty definition - somewhere in your include paths before irrMath.h. Without knowing more about the libraries you've got installed, and your include paths, it's hard to tell any more.

I'd suggest moving \irrlicht-1.4beta\include\ to the top of your include order and see if that fixes it. If so, you can move it down one at a time until it breaks, and that should give you a hint as to what is causing the problem.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply