gcc -L/Library/Frameworks/SDL.framework/ -o test test.o SDLmain.o -framework SDL -framework Cocoa
Compiling works fine but I am getting the following linker error:
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_CGDisplayCopyAllDisplayModes referenced from SDL expected to be defined in ApplicationServices
_CGDisplayCopyDisplayMode referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeCopyPixelEncoding referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeGetHeight referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeGetWidth referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeRelease referenced from SDL expected to be defined in ApplicationServices
_CGDisplayModeRetain referenced from SDL expected to be defined in ApplicationServices
_CGDisplaySetDisplayMode referenced from SDL expected to be defined in ApplicationServices
collect2: ld returned 1 exit status
make: *** [test] Error 1