2009-12-21

XCode, macports and SDL ... what a hell

After long searches on the web, mailing lists, forums and wikis, I finally got xcode 3.2 compiling/linking my application that uses libsdl.

Using the macports libsdl won't work. Trying to make it work was my big mistake. I was getting compiler errors and linker undefined symbols like "_SDL_PushEvent" and others similar.

The solution was to download all the latest dmg files from http://www.libsdl.org and don't forget the SDL-devel-1.2.14-extras.dmg with the xcode project templates.

Copy all the frameworks (SDL, SDL_Image, SDL_Mixer ...) to "/Library/Frameworks" install the templates that come with the SDL-devel-1.2.14-extras.dmg and now you can launch Xcode and chose a SDL template. Should compile and link successfully.

0 comments: