Kompilieren von SDL auf MAC

#include "ffmpeg/libavcodec/avcodec.h"

#include "ffmpeg/libavformat/avformat.h"

#include "ffmpeg/libswscale/swscale.h"
#include "ffmpeg/libswscale/rgb2rgb.h"
#include "ffmpeg/libswscale/swscale_internal.h"

#include <stdio.h>

#ifdef __MINGW32__
#undef main /* Prevents SDL from overriding main() */
#endif

#include "SDL.framework/Headers/SDL.h"
#include "SDL.framework/Headers/SDL_thread.h"

Kompiliert wird mit diesem Befehl:

gcc -o t1 tutorial01.c -lswscale -lavutil -lavformat -lavcodec -lz -lavutil -lm -framework SDL

Aber ich bekomme diese Fehlermeldung:

Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
     (maybe you meant: _SDL_main)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Vom googeln, Wenn ich versuche, einfügen : #include "SDLMain.h" es hat großen Aneurisms.

InformationsquelleAutor mrdavenz | 2010-10-26
Schreibe einen Kommentar