How do i compile an sdl .c file? what are the

s> Replacing main doesn’t work. My code is in a DLL :slight_smile:
That’s fine, just don’t expect your code to work on every platform.
I’m just hoping this will be done in SDL 1.3.
Without it, embeddding – which most if not all language
bindings need – will be much more difficult. Whoever
maintains the Ocaml, Python, Perl … or Felix bindings
has to do a lot less work with the startup/finish paradigm
than a main replacement paradigm for the simple reason
the latter is unusable. You really don’t think Perl
or Python would defer to SDL and allow it to replace
its mainline?

Of course not - this has already been discussed wrt pygame.
It seems the mac pygame maintainer has copy’n’pasted the mac
main() entry and exit code into the pygame source.
It’s a solution, but not a very portable or nice one.

They too will require any startup/finish
code to be called from dynamically loaded shared libraries,
as does Felix.

Even renaming the mains in SDLmain to platform_main_entry(argc, argv)
and platform_main_exit would improve things a lot - one could choose
the simple approach or simply know that SDL is a library that requires
two init functions and two de-init functions:

platform_main_entry(argc, argv);
// killer app here

It would save the SDL binding folks cut’n’paste bugs and conditional
compilation and instantly make the bindings more portable, essentially
doing for bindings what SDL currently does for c/c++ apps.
I reckon it’d be a big bonus for SDL. I’ll put my hand up for doing
the mac part.> Date: Sun, 05 Mar 2006 15:24:18 +1100

From: skaller
On Sun, 2006-03-05 at 01:03 +0000, Peter Mulholland wrote: