• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0

Xcode 4 with SDL

4 posts in this topic

Hi gys im seeking help from someone who knows about the OSX xcode 4 compiler and runtime

Ok so Im a big fan of SDL and have used it on windows form nearly a year now. After some research I found that the iphone could compile c++ so I have been triyng to get SDL working with xcode 4 on my mac.

after a bit of research I found there is very little help on trying to do this for xcode 4. But from my knowledge from windows it accrued to me that all I really needed to do was add the SDL framework to the project then make the header files visible to the compiler.

This was fairly easy to do a simple test program compiles no problem. Now I hit the hurdle when trying to run the program I get the error message

dyld: Library not loaded: @executable_path/../Frameworks/SDL.framework/Versions/A/SDL

Referenced from: /Users/maxashton/Library/Developer/Xcode/DerivedData/SDL_Test-aolpwbzxuhkmfgategasbecconuo/Build/Products/Debug/SDL_Test.app/Contents/MacOS/SDL_Test

Now from my my knowledge from windows I know that the SDL.dlls have to be in a location which the runtime can see (project folder or system32).

could it be that I am missing the dll equivalent for OSX? if so where could I find these they dont come in the download and the SDL framework isn't something I can compile to create them myself.

Thanks for the help in advanced :)

Share this post

Link to post
Share on other sites
Yup you're right about it missing the shared library. If you install the runtime libraries for SDL you would see it under your /Libraries/Framework/SDL path (which is roughly equivalent to the DLL being under your system32 folder), or you can embed it inside your application package which is where dyld is telling you it can't find it. You can find the shared library by getting the runtime library here: http://www.libsdl.org/download-1.2.php, although the website is acting a bit strange right now and not giving me actual downloads. If that fails you can build it yourself from the development source on the same page. Just open the XCode project, set the SDK/compiler/OS version appropriately and build the Framework, it'll have what you're missing! Good luck!

Share this post

Link to post
Share on other sites
Thanks for the reply, you mentioned installing SDL runtime libraries, on Lion the SDL install and template don't work. I redownloaded the runtime but all I have are header files and one resource .nib file.

Here are my steps so you can see exactly what I did

Manually copy the entire SDL.framework folder from the SDL.dmg download to the /Developer/Library/Frameworks folder.
Created an Xcode koko project removed the current .h and .m files
Included the SDL.Framework in the projects frameworks
Under project Build settings pointed the HeaderSearchPath Bebug and Release to the /Developer/Library/Frameworks/SDL.Framework/headers
Included the SDLMain.h and SDLMain.m files from the devlite folder from the download into the project

Project now successfully compiles but is missing the runtime libs

Copied the SDLmain.nib from SDL.Frameworks/Resources into the project folder Documents/Xcode/Test/Test

Made no difference, maybe this is the wrong place for this?

As I said all of this was guess work from windows knowledge so it is probably something something dead simple

thanks again

Share this post

Link to post
Share on other sites
Hmm that all seems reasonable, when I download the runtime library and do ls -lR I get:

[source lang="bash"]./SDL.framework:
total 24
lrwxr-xr-x 1 endo staff 24 19 Jan 2012 Headers -> Versions/Current/Headers
lrwxr-xr-x 1 endo staff 26 19 Jan 2012 Resources -> Versions/Current/Resources
lrwxr-xr-x 1 endo staff 20 19 Jan 2012 SDL -> Versions/Current/SDL
drwxr-xr-x 4 endo staff 136 19 Jan 2012 Versions

total 8
drwxr-xr-x 5 endo staff 170 19 Jan 2012 A
lrwxr-xr-x 1 endo staff 1 19 Jan 2012 Current -> A

total 1464
drwxr-xr-x 40 endo staff 1360 19 Jan 2012 Headers
drwxr-xr-x 4 endo staff 136 19 Jan 2012 Resources
-rwxr-xr-x 1 endo staff 747208 19 Jan 2012 SDL

total 1216
-rw-r--r-- 1 endo staff 3233 19 Jan 2012 SDL.h
-rw-r--r-- 1 endo staff 1482 19 Jan 2012 close_code.h

total 8
-rw-r--r-- 1 endo staff 1180 19 Jan 2012 Info.plist
drwxr-xr-x 3 endo staff 102 19 Jan 2012 SDLMain.nib

total 8
-rw-r--r-- 1 endo staff 1701 19 Jan 2012 objects.nib

total 40
-rw-r--r-- 1 endo staff 1485 19 Jan 2012 ReadMeDevLite.txt
-rw-r--r-- 1 endo staff 374 19 Jan 2012 SDLMain.h
-rw-r--r-- 1 endo staff 11197 19 Jan 2012 SDLMain.m[/source]
It's the ./SDL.framework/Versions/A/SDL that's 747208 bytes which is the library I think you're looking for. Trying adding that file to the path dyld is looking for. Or just copy the Framework to /Library/Frameworks and hopefully it should work! Edited by Endogenous

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0