[SDL] Can't run SDL apps in OSX 10.6

Gabriele Greco gabriele.greco at darts.it
Wed Dec 15 08:07:08 PST 2010


On Wed, Dec 8, 2010 at 12:09 PM, Lagrange Marc <markocpc at gmail.com> wrote:

> I'm trying to run a simple SDL test under OSX 10.6 but it fails, saying:
>
> int main(int argc, char *argv[]) {
>    run();
> }
>
> #include <SDL/SDL.h>
>
>
I think the problem is that main is declared before SDL.h is included, you
should include SDL before main so that SDL substitutes main() with
SDL_main() and does it's internal initializations. You should also link with
SDLmain.

-- 
Ing. Gabriele Greco, DARTS Engineering
Tel: +39-0105761240  Fax: +39-0105760224
s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20101215/4fb1b2bb/attachment-0008.htm>


More information about the SDL mailing list