Fenris Wrote:Heh... At this point, I would think that you've made some odd mistake somewhere. Throw it all away (keep whatever source code you have) and set it all up again. These should be the steps:

Create the new project
Add the source
Drag the frameworks into the project
Include the framework by: #include <SDL/sdl.h>
Clean and build

Sometimes, you can save time by restarting. ;-) Hope this helps.

now it seems to work...
I've created a new project, added the frameworks and the source and added -framework SDL to the link flags
however now when I hit "build and run" it says "no launchable executable present to run"
lol...
well I'll read some documentation now

Fenris Wrote:Uh? That's what would happen if you have selected to build a framework or a library - did you select "Cocoa application" when you were prompted for a project type? (Back when you set it all up)

Ah, yes. Here's the REALLY confusing part. It will still be cross-platform. The thing is that on Mac, SDL is written in Objective-C (using Cocoa - there's a language/API duality there). On Windows, SDL is written in C, and probably on Linux as well. The thing is that it doesn't matter what language SDL is written in, just what language YOUR code is in. If you write a game on a Mac, using SDL and say, C++, the code YOU write will compile just fine with the C-SDL on Windows and so on.

So, the bottom line here is: yes, SDL is in Cocoa on Mac, but you won't ever see a single line of it. Good luck, and keep asking!

Edit: If you want help right away, I'm in the #idevgames chatroom on Freenode.net

It has a complete XCode project set up with the SDL (and SDL_mixer etc.) all included. Have a look at the build settings and also take a look at some of the header files (I think Game.h has an SDL include in it, but you should be able to find it by looking around).

Also notice that the SDL frameworks are copied into the application bundle using the 'Copy Files Build Phase' so that the App will run on any system, without requiring the user to install SDL.

If you like you can just use my code as a base for what you want to write, but be warned, I haven't set up anything for OpenGL, the Viewer part of the MVC is purely designed for SDL 2D blitting.

Installed correctly, you should be able to start a new project, choose the SDL OpenGL template, and have a compilable, working SDL OpenGL app generated for you. Then you can cannibilize it.

If you can't create the project might try reinstalling SDL. (They've had installer permission problems in the past, sometimes people have had to manually fix permissions on the template projects before they would work.)

MattDiamond Wrote:Installed correctly, you should be able to start a new project, choose the SDL OpenGL template, and have a compilable, working SDL OpenGL app generated for you. Then you can cannibilize it.

If you can't create the project might try reinstalling SDL. (They've had installer permission problems in the past, sometimes people have had to manually fix permissions on the template projects before they would work.)

I've tried with SDL OpenGL app and it works!
However I noticed some problems... for example