Page 1 of 1

Errors compiling when getting started

Posted: Mon Oct 15, 2007 7:47 pm
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

Posted: Mon Oct 15, 2007 8:34 pm
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.