The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
xcode 4
Vinay
Guest

hi

i tried using the project templates with xcode 4, and they show up in
the new projects menu. is there something different i need to do, or
is it just not compatible.

any help to setup a project in xcode 4 would be great.

thanks

vinay
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
xcode 4
Vinay
Guest

correction ...

i tried using the project templates with xcode 4, and they "don't" show up in
the new projects menu.



On Fri, Mar 11, 2011 at 11:53 PM, Vinay wrote:
Quote:
hi

i tried using the project templates with xcode 4, and they show up in
the new projects menu. is there something different i need to do, or
is it just not compatible.

any help to setup a project in xcode 4 would be great.

thanks

vinay

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
xcode 4
Eric Wing
Guest

On 3/12/11, Vinay wrote:
Quote:
correction ...

i tried using the project templates with xcode 4, and they "don't" show up
in
the new projects menu.


It looks like Xcode 4 changed the template rules (again). I think
we're going to have to create new templates for Xcode 4.

-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
xcode 4
liam mail
Guest

On 13 March 2011 00:21, Eric Wing wrote:
Quote:
On 3/12/11, Vinay wrote:
Quote:
correction ...

i tried using the project templates with xcode 4, and they "don't" show up
in
the new projects menu.



It looks like Xcode 4 changed the template rules (again). I think
we're going to have to create new templates for Xcode 4.

-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org






Link posted on twitter that maybe of use here.
http://blog.boreal-kiss.net/2011/03/11/a-minimal-project-template-for-xcode-4/


Liam
Re: xcode 4
manifest


Joined: 16 Mar 2011
Posts: 9
Vinay wrote:
hi

i tried using the project templates with xcode 4, and they show up in
the new projects menu. is there something different i need to do, or
is it just not compatible.

any help to setup a project in xcode 4 would be great.

thanks

vinay
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


here is a SDL iOS template for Xcode 4: https://github.com/manifest1985/sdl-ios-templates
xcode 4
Neil White
Guest

template rules.... its just not SDL is it. Wink
Re: xcode 4
manifest


Joined: 16 Mar 2011
Posts: 9
Neil White wrote:
template rules.... its just not SDL is it. Wink

Why not? With it you can create a SDL application for iOS in a few clicks.
Use SDL iOS build script to build SDL framework: https://github.com/manifest1985/sdl-ios-framework
methezer


Joined: 20 Mar 2011
Posts: 1
This is what I did to get SDL working with XCode 4. I'm new to both SDL and XCode so if I did something dumb here please let me know
I was originally trying to get it to work in eclipse (still unsuccessful) but managed to get it to work with XCode based on the little information I found online for getting eclipse setup . There was a lot of struggling on my part so I hope this helps someone in a simillar situation.

-Create a new XCode project. Choose the blank template under Mac OS X - other.

-File Menu -> Add files to "your project name." Choose SDLMain.m and SDLMain.h to your project. These are included with the SDL Devel Extras download. Make sure to check the box to copy the items into the folder.

-Once copied, I found that I had to change "#include "SDL.h"" to "#include <SDL/SDL.h>" in SDLMain.m

-Add a c++ file to your project. I'll call it main.cpp for the purpose of this walkthrough.

-File Menu -> New Target. Select cocoa application. Give it a name and click finish.

-Click on your project icon in the left column. In the main window select the target you just made and then choose "build phases" at the top of the window.

-Expand "compile sources" and remove the two files that are in there (main.m and test321appdelegate.m) Add your main.cpp file and SDLMain.m to compile sources.

-Expand "Link binary with Libraries". Add SDL.framework here. You would also add other extension libraries here like SDL_mixer or SDL_image if you were using them.

-Click "add build phase" and select "add copy files." Expand "copy files" and change "Destination" from "resources" to "frameworks."

-Click to add an item, choose "add other" navigate to Macintosh HD -> Library -> Frameworks -> SDL.framework

-You should now be able to build and run your project. Remeber to #include <SDL/SDL.h> in your c++

Again, I'm really new with both SDL and XCode so there may indeed be a better way.