SDL under Windows

Hello,

I’m a new SDL user and I wonder if it’s compulsory to use SDL_main? and why?

Thank you in advance.–
Matthieu DUFOURNEAUD
49, boulevard Normandie Niemen
42100 Saint-Etienne
FRANCE
Tel: +33 (0)4 77 34 15 24
Email: matthieu.dufourneaud at fnac.net

Maitrise d’Informatique
Faculte des Sciences et Techniques de Saint-Etienne

No, I just copied the important stuff to a “InitSDL” function and called it

–Manny

At 03:50 PM 3/24/2001 +0100, you wrote:from my main.

Hello,

I’m a new SDL user and I wonder if it’s compulsory to use SDL_main? and why?

Thank you in advance.

Matthieu DUFOURNEAUD

Hello,

I’m a new SDL user and I wonder if it’s compulsory to use SDL_main? and why?

No, but if you don’t, you need to call SDL_RegisterApp(), as shown
in src/main/win32/SDL_main.c

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

I’m a new SDL user and I wonder if it’s compulsory to use SDL_main? and why?

it is also most crossplatform to use the SDLmain library. there
is are special initialazations needed for the mac platform too,
so just using a main() and linking with SDLmain will run on all
platforms too i believe