第1课(上) - 开始使用SDL · 在XCode中使用SDL


更新时间:2012年7月1日


译者注:本页面还未完成翻译,主要是因为译者对XCode不太熟悉,不敢胡乱翻译。如有熟悉XCode并有兴趣翻译此文章者,请立即 联系我
1)First thing you need to do is download the SDL library. It's available on the SDL website.
You'll need to download both the runtime and developers packages.

2)Open up the runtime package. Copy the SDL.framework folder to /Library/Frameworks.

2)Open up the developer package and go inside of the XcodeTemplates folder. Go inside of the TemplatesForXcodeSnowLeopard and copy the set of folder inside of it. Go to /Library/Application Support/Developer/Shared/Xcode/Project Templates/Application and paste the set of folders inside here. If the folder does not exist, create it.

3)Start up XCode and create a new XCode project. Select SDL Application, which should be under User Templates > Application.

4)Go to project settings:

5)Set your base SDK to the latest version of Mac OS X you have available:

6)Now build and run your project (which shows a blank window).

If it compiles you're done. Otherwise go back and make sure you didn't skip a step.
In the developer package there should be a folder contains the SDL documentation.

I highly recommend that you extract them somewhere and keep it for reference.

 

下一部分: 在屏幕上显示一张图片