I have added the SDL2 framework to Library/Frameworks, Created a C++ Console Application in Xcode, included the framework in the Xcode project and set the framework search path. When I run the program it comes up as "Build succeeded" then Xcode crashes. This is the same issues as described here. It seems like the fix is to compile the framework manually but I'm not sure how this is done. Any ideas?
Asked
Active
Viewed 635 times
1 Answers
5
I run into the same problem a while ago too ...
It turns out that code signing is the issue here. I assume that you have downloaded the SDL2.framework directly from their website which won't work because their code signing is corrupted.
There are two ways to solve this problem:
Download the source code instead and build the SDL2.framework from the included XCode project and copy the result from products into /Library/Frameworks/
Resign it manually using "codesign -f -s /Library/Frameworks/SDL2.framework/SDL2"

Alexander Meißner
- 806
- 5
- 14
-
1. Which source code file was it? I downloaded SDL2-2.0.3.zip and it contained an Xcode project called SDL and another called SDLTest. Which project is it? And what specifically am I copying to /Library/Frameworks because the SDL2 framework isn't included in either project. 2. I get an error "no identity found". – Striving Sep 07 '14 at 09:09
-
2Well obviously "SDLTest" is only for testing purposes so it has to be the project file called "SDL". And it does not contain a SDL2.framework yet, that is what has to be compiled. So open "SDL"-XCode project and click build. Than go to the file outliner (left side of the XCode window) and choose "Products" then right click "open in Finder" and copy that SDL.framework to /Library/Frameworks/. Could it be, that you are unfamiliar with the general concepts of compiling/building/linking and especially XCode? – Alexander Meißner Sep 07 '14 at 09:13
-
Thankyou for your help. I realised that the command wasn't working because Xcode was named Xcode6-Beta7.app instead of just Xcode.app. I renamed it and it now works. – Striving Sep 07 '14 at 09:31
-
Well if you use different versions of XCode you can use the command "xcode-select" instead of renaming them. This is needed because the tools need to know where to find the actual executables. – Alexander Meißner Sep 07 '14 at 10:36