SDL under Win32

Why do I have to include manually windows.h under Win32. Why didn’t you make
SDL.h header include it, to be really portable without any change?

Can I use SDL under Win32 with BloodShed?–
Marco Iannaccone @Marco_Iannaccone
ICQ: 18748121 MetalCoder

"What is real? How do you define real? If you’re talking about your
senses, what you feel, taste, smell, or see, then all you’re talking about
are electrical signals interpreted by your brain."
Morpheus - The Matrix

“Marco Iannaccone” wrote

Why do I have to include manually windows.h under Win32. Why didn’t you make
SDL.h header include it, to be really portable without any change?

marco, there shouldn’t be any reason your program using straight
SDL should need windows.h included. i’m guessing you might be
trying to do something special with the main() function? you
shouldn’t do anything, just use a normal main() function and link
your game with SDLmain.lib

“Marco Iannaccone” wrote

Why do I have to include manually windows.h under Win32. Why didn’t you make
SDL.h header include it, to be really portable without any change?

marco, there shouldn’t be any reason your program using straight
SDL should need windows.h included. i’m guessing you might be
trying to do something special with the main() function? you
shouldn’t do anything, just use a normal main() function and link
your game with SDLmain.lib

He’s using OpenGL, which does require windows.h on Windows.

I’d hate to add windows.h to SDL.h, but does anybody have any other
solutions? windows.h has to be included before gl.h

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

“Marco Iannaccone” wrote

Why do I have to include manually windows.h under Win32.
Why didn’t you make

SDL.h header include it, to be really portable without any change?

marco, there shouldn’t be any reason your program using straight
SDL should need windows.h included. i’m guessing you might be
trying to do something special with the main() function? you
shouldn’t do anything, just use a normal main() function and link
your game with SDLmain.lib

He’s using OpenGL, which does require windows.h on Windows.

I’d hate to add windows.h to SDL.h, but does anybody have any other
solutions? windows.h has to be included before gl.h

Please don’t add windows.h to SDL.h… This would increase compile times
for win32 SDL programs considerably…

The only ‘solution’ I can think of is a seperate include file (sdl_gl.h ?),
which would include (#ifdef wise) os dependant stuff that needs to be
included before gl.h…> -----Original Message-----

From: Sam Lantinga [mailto:slouken at devolution.com]
Sent: maandag 12 februari 2001 1:34
To: sdl at lokigames.com
Subject: Re: [SDL] SDL under Win32

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Hrm - there’s lots of versions and varients of OpenGL (not really but :slight_smile:
Anyways, why not have an SDLgl.h that includes OS-specific versions of
<GL.h>

on any unix: (not tested but this is official standard afaik :slight_smile:
#include <GL/gl.h>

on windows: (ye rebel OS that doesn’t do anything without biting ones
ears off and sacrificing a goat to the gods of stable
libraries so that you can find program bugs without being
hit by OS bugs :slight_smile:
#include <windows.h>
#include <GL/gl.h>

Yes I realize this is a bit odd way of doing things, but you never know
what dependencies any opengl might have. I wonder what MacOS’s or BeOS’s
opengl requirements are…

G’day, eh? :slight_smile:
- WinterlionOn Sun, 11 Feb 2001, Sam Lantinga wrote:

“Marco Iannaccone” wrote

Why do I have to include manually windows.h under Win32. Why didn’t you make
SDL.h header include it, to be really portable without any change?

marco, there shouldn’t be any reason your program using straight
SDL should need windows.h included. i’m guessing you might be
trying to do something special with the main() function? you
shouldn’t do anything, just use a normal main() function and link
your game with SDLmain.lib

He’s using OpenGL, which does require windows.h on Windows.

I’d hate to add windows.h to SDL.h, but does anybody have any other
solutions? windows.h has to be included before gl.h


Any fool could be a witch with a runic knife, but it took skill to be one
with an apple-corer.
- Terry Pratchet, Carpe Jugulum

Member in purple standing of the Mad Poet’s Society.
Trying to bring truth from beauty is Winterlion.
find at this winterlions’ page