Am I using the right header files?

#ifdef WIN32
#pragma comment(lib, “SDL.lib”)
#pragma comment(lib, “SDLmain.lib”)
#endif
#include “SDL.h”
#include <stdlib.h>
I’m getting these errors:

‘SDL_event’ : undeclared identifier
SDLK_ESC : undeclared identifier
error C2051: case expression not constant

Randy schrieb:

‘SDL_event’ : undeclared identifier
SDLK_ESC : undeclared identifier
error C2051: case expression not constant

Please check the docs before posting. It’s:

SDL_Event

and

SDLK_ESCAPE

Greetings
Sebastian

Heh, I do that kind of stuff all the time. APIs are always using
slightly different names from each other. (BREW uses “.dx” and ".dy"
for width and height of a rectangle, while SDL uses “.w” and “.h”).

It MAY be that Randy was looking at some little pseudo-code example, or
untested example code from a little how-to somewhere.

If so, Randy, you should have them correct /their/ typos.

But if not… yeah… check the docs first, next time! ;^)

-bill!On Sat, Jan 08, 2005 at 07:27:49PM +0100, Sebastian Beschke wrote:

Randy schrieb:

‘SDL_event’ : undeclared identifier
SDLK_ESC : undeclared identifier
error C2051: case expression not constant

Please check the docs before posting. It’s:

SDL_Event

and

SDLK_ESCAPE

Bill Kendrick schrieb:

Heh, I do that kind of stuff all the time. APIs are always using
slightly different names from each other. (BREW uses “.dx” and ".dy"
for width and height of a rectangle, while SDL uses “.w” and “.h”).

Yeah, me too. I wasn’t exactly trying to be rude. But whenever I get an
error that says “Unknown identifier”, the first thing I do is check for
misspellings.

But of course, handling error messages is something that must be learned
by experience.

It MAY be that Randy was looking at some little pseudo-code example, or
untested example code from a little how-to somewhere.

If so, Randy, you should have them correct /their/ typos.

True.

But if not… yeah… check the docs first, next time! ;^)

-bill!

-Sebastian

?Hiroyuki Murohashi???>Bill Kendrick schrieb:

Heh, I do that kind of stuff all the time. APIs are always using
slightly different names from each other. (BREW uses “.dx” and ".dy"
for width and height of a rectangle, while SDL uses “.w” and “.h”).

Yeah, me too. I wasn’t exactly trying to be rude. But whenever I get an
error that says “Unknown identifier”, the first thing I do is check for
misspellings.

But of course, handling error messages is something that must be learned
by experience.

It MAY be that Randy was looking at some little pseudo-code example, or
untested example code from a little how-to somewhere.

If so, Randy, you should have them correct /their/ typos.

True.

But if not… yeah… check the docs first, next time! ;^)

-bill!

-Sebastian


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hiroyuki Murohashi schrieb:

?Hiroyuki Murohashi???

Welcome. :wink:

???

-Sebastian

Hi.

Hiroyuki Murohashi schrieb:

?Hiroyuki Murohashi???

Welcome. :wink:

???

-Sebastian

I’m sorry. It was sent by mistake.

Regards.–
Hiroyuki Murohashi