[Mono-devel-list] SDL on mac os x: has anyone managed it yet?
bell_jason at yahoo.ca
Tue Feb 22 04:35:01 EST 2005
As some of you probably know, SDL (simple directmedia
layer) renames your c applications main function to
SDL_main using a macro, and provides it's own main
function, wherein it performs mac specific
However, the code that does this on the mac is written
in objective C (the ugliest and most awkward code
EVER) and causes all sorts of problems with other
So, c# code that utilises SDL that works beautifully
under windows or linux fails on the mac because no
autorelease pool was created.
In freepascal, you can get around this by manually
changing the main function to SDL_main, and linking
against libSDL.dylib (SDL.framework won't work because
for some reason it doesn't contain the initialisation
code itself). Thus, the application starts in SDL's
main function, which then calls SDL_main, and so
enters your program's loop.
Has anyone looked at some way of getting SDL working
with mono on mac os x? I assume a solution similar to
this would work, though the downside of the change
made for freepascal was that you could now only build
SDL applications. What would be ideal would be if
there was a command line paramter to specify the name
of the function to start in, not just the class. So
you could rename "Main" to "SDL_main".
Assuming that would work at all: I assume unmanaged
code would have problems seeing/accessing functions in
Post your free ad now! http://personals.yahoo.ca
More information about the Mono-devel-list