[SDL] SDLMain: many problems on MacOSX

Enzo enzogupi at interfree.it
Wed Apr 28 13:05:59 PDT 2004


Max Horn wrote:

> That usually means that your source file in which you define the main() 
> function does not #include SDL.h. You *must* #include SDL.h in that 
> file, because it contains something like
> 
>    #define main SDLMain
> 
> Then, the real main() is provided by libSDLmain.

  apple:~/source/battle$\>make
  c++ -c  -I../didlib -Wall battle.cc
  c++  -I../didlib -o battle battle.o -L/usr/local/lib -Wl -framework SDL
     -framework SDL_mixer -framework SDL_ttf -framework Cocoa
  ld: Undefined symbols:
  _main
  make: *** [battle] Error 1

Yes, as you said, the real main() is provided by libSDLmain,
but I don't have libSDLmain.a, and I can't compile it from SDL sources
(I get some errors, written in my previous mail).

Cheers,
Enzo.





More information about the SDL mailing list