Reputation: 906
Consider me a complete and utter newbie wehen it comes to compiled languages (and to Xcode IDE in general)
I've followed some tutorials on setting XCode up to work with SDL frameworks, they seem to be a bit dated, designed to work with OSX 10.6 or 10.7 so I also made sure I'm following the readme's within SDL dmgs.
I can't figure out where in the file system do I put my SDL.framework (or any other framework like SDL_image.framework, for that matter). I've tried
/Library/Frameworks
/System/Library/Frameworks
~/Library/Frameworks
When I open Xcode and browse for frameworks to add / link, the SDL frameworks are nowhere to be found.
When I opened a template project downloaded from https://github.com/Ricket/HelloSDL All the framework references were colored red, as in 'error' or 'does not exist'.
Can someone please tell me, where the hell do I put those things? Oh, and any up-to date Xcode + sdl settup tutorial would be of great value to me too!
Upvotes: 0
Views: 965
Reputation: 2137
Assuming you have the SDL.Framework downloaded or the SDL2.Framework compiled if you are working on that version it doesn't matter too much where you put it as long as you link it correctly in your project. I generally tend to keep them in /Library/Frameworks
Step 1. Select your build target and choose the Build Settings
section. Then search for Framework Search Paths
or alternatively scroll down to the Search Paths
section and expand it if needed. Set the value of Framework Search Paths
to be the location you have placed your frameworks.
Step 2. To then include the framework in your project, select your build target and choose the Build Phases
section. Expand Link Binary With Libraries
and click the + button. In the popup window which appears you need to click Add Other
then browse to the location you placed the framework e.g. /Library/Frameworks
and select the framework to add.
Upvotes: 1