Xcode and SDL problems

Nibbie
Posts: 2
Joined: 2010.09
Post: #1
I am trying to set up Xcode (version 3.0) and the most recent version of SDL. All I'm doing right now is trying to get a blank project to work. I did a new SDL Application. I can build and run the "blank" project with no errors, but I don't see a blank screen popping up. It just goes to the workspace page, and then the application quits after a few seconds and says "The Debugger has exited due to signal 5 (SIGTRAP)" in the bottom panel. Is this what I am supposed to see? All the other forums I've looked at talk about a blank screen coming up that only quits if you press a key.

I'm totally new to Xcode/SDL so detailed help is appreciated! I know the basics of programming but I am by no means an expert.

Also, any tips for getting started? Thanks!
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #2
What is happening when you run the application is not normal. When you run the application, a blank window should open.

The SDL Xcode project templates are supposed to just work. What you are doing, starting with the basic SDL application template, is the right way to start so it's hard to provide tips on how to get started. One thing you should check is to make sure you installed the right Xcode project templates. SDL 1.2.14 includes templates for Tiger, Leopard, and Snow Leopard. You're using Xcode 3.0, which means you're running Leopard, so you should install the Leopard templates.

If you click the link in my signature, you can find an article I wrote on SDL and OpenGL that uses Xcode. The article may help you get started.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2010.09
Post: #3
Thank you for your help Mark. Unfortunately, I copied the templates over again just in case, and I'm getting the same problem. I have actually been using your website (very helpful!), and I can get your project to run with the purple rectangle. I don't get why it isn't working with the basic template though. Maybe my templates are messed up somehow.

I also tried running an OpenGL SDL application but got the following:
error: There is no SDK at specified SDKROOT path '/Users/AHess/stltest/macosx10.4'
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #4
Here's a couple of more things to check.

1. Make sure the SDL framework is in /Library/Frameworks.
2. Make sure /Library/Frameworks is in your Frameworks Search Paths build setting.

Another thing to try is setting a breakpoint on the first line of the main() function in main.c. Click in the gutter on the left side of the editor to set a breakpoint. Choose Run > Debug to run the app in the debugger. Step through the code to see where the error is occurring.

Regarding your SDKROOT error, try changing the Base SDK build setting. Choose Project > Edit Project Settings to access the project's build settings.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2010.09
Post: #5
Hey, what's happening is that you have no SDK installed for Mac OS 10.4 (Tiger).
Just select the 10.5 SDK to the top left of your Xcode window and it should run fine.
Quote this message in a reply
Post Reply