ogrealprereqs.h(88) : error C2143

Elm0

12-06-2008 02:31:27

I compiled ogreAL without having any problems (I use the latest ogreAL from subversion and Ogre_sdk 1.45)
In my current project (vs8), I included:
#include "OgreALListener.h"
#include "OgreALSoundManager.h"
#include "OgreAL.h"


All additional includes and libraries have been set but if I compile I keep getting the following error:

ogrealprereqs.h(88) : error C2143: Syntaxfehler: Es fehlt '}' vor '('


or in english


ogrealprereqs.h(88) : error C2143: Syntaxerror: '}' is missing before '('


THX for any help

siberian

14-06-2008 04:24:18

OK so from that it thinks there is an error on line 88.
In mine lines 86 to 95 are:
enum AudioFormat
{
DEFAULT,
MONO_CHANNEL,
STEREO_CHANNEL,
QUAD_CHANNEL,
MULTI_CHANNEL_51,
MULTI_CHANNEL_61,
MULTI_CHANNEL_71
};

with line 88 being
DEFAULT,
Now i dont know what your file looks like but there is no '(' in these lines. so you might want to check whether what your compiler thinks is line 88 is what i think line 88 is. Then post the line in OgreALPrereqs.h that the compiler is dieing on.

Elm0

14-06-2008 13:20:18

It looks exactly the same, line 88 points to DEFAULT,

BTW: if I take the 3 Headerfiles out of the project, it compiles just fine.

metaldev

06-08-2008 22:34:09

I'm getting the same error now since trying to integrate myGUI...

i wonder if its something to do with the formatting of the text in the source files due to being written in different languages or OS ?
end-of-file could be different or something? :(

did anyone find a good solution?

nikki

13-08-2008 05:34:31

I got it. Its because MyGUI does this define:-
#define DEFAULT ((int)-1)
That's what's causing the problem.

A quick fix would be to include OgreAL.h before MyGUI.h.