SDL in XCode 4.3.2 SDLMain.o undefined symbols

I have started trying to use SDL in Xcode 4.3.2 so I started up a Cocoa application for Mac OS X and connected all my frameworks : OpenGL, SDL etc. I don't have SDL_Image, SDL_Mixer etc. (Do I need these?) When I try to compile the project that just has SDLmain.h and SDLmain.m I get this error:

Undefined symbols for architecture x86_64: "_SDL_main", referenced from: -[SDLMain applicationDidFinishLaunching:] in SDLMain.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)


I was having the same issue with SDL 1.2.15 on Xcode 4.5 and OS X 10.7, turned out the problem was that I added SDLMain.m and SDLMain.h (according to a suggestion on the libSDL website about OS X frameworks) to an existing SDL project which messed up with main. Bottom line is that you don't need those files just because you are using Cocoa -- SDL's own test apps don't use it either and run just fine on OS X.

Need Your Help

Upgrading spring from 3.2 to 4 - Issue with generics (extends)

spring exception generics spring-4

I have the below code that worked with spring 3.2 and fails with a "NoSuchBeanDefinitionException" on spring 4.0.0.RELEASE

mySQL Query to Extract/Replace src parameter from <img> tag in field data

mysql replace image src

I have a situation where I'm upgraded a CMS based website that has had some major changes over the years on how to handle certain field types. On in particular is images. Originally an tag in a text