(SDL 1.2) SDLMain.m have warnings in Xcode

206 Views Asked by At

I have issues in my Xcode SDL project , which I made with this tutorial

What can be wrong?

screenshot

1

There are 1 best solutions below

0
On BEST ANSWER

The most likely cause of your errors is you created a Cocoa application project that uses automatic reference counting (ARC). The Mac version of SDL 1.2 uses manual reference counting, and that is causing your compiler errors.

The fix is to turn off ARC for your project. Set the Objective-C Automatic Reference Counting build setting to NO. You can access your project's build settings by selecting your project from the project navigator on the left side of the project window.

Unless you have a bunch of existing SDL 1.2 code, I recommend using SDL 2 instead of 1.2. SDL 2 is easier to set up, especially on Macs. You do not have to deal with SDLMain.m when you use SDL 2.