Reputation: 57
I'm working on a little project and I'm trying to use SDL2 library! I installed the SDL2.framework successfully in my library/framework folder. Then when I tried to link my headers and my framework in Xcode by adding the Library/Framework path for the framework and /Library/Framework/SDL2.framework/Headers for the headers in my app settings! Then I include . #include Afterward when I run the program there is an error but not about the fact it doesn't find headers.
Do you guys have a few tips about this?
Thank you PS : sorry for the eventual English mistake
edit: i finally manage to run the program (i forgot to link binary) but now Xcode shut down right after it
Upvotes: 0
Views: 1090
Reputation: 57
I finally could install it for those who are struggling with this ! 1. Download SDL2 source code on the website. 2. Compile the framework and copy SDL2.framework in the Library/Framework directory. 3. Create a classic Xcode project in C. In build settings. Then in Build Phases add SDL2.framework in the "Link binary with libraries" Indicate for the headers search paths : Library/Frameworks/SDL2.framework/Headers and Library/Frameworks for the framework search paths.
Hope this can help some of you. Thank you all for the help !
Upvotes: 1
Reputation: 2137
try the following tutorial to see if it helps - http://zamma.co.uk/setup-sdl2-in-xcode-osx/
Upvotes: 0