-1

Ever since I switched to Yosemite, I have been getting an Xcode quit unexpectedly error whenever I try to run SDL2. I can't even get a "hello world" to run. I am trying the fix it by following the directions on this page:

Xcode 5 crashes when running an app with SDL 2

But I don't know how to "Compile the "Framework" target in Xcode/SDL/SDL.xcodeproj" I tried just simply building it but that doesn't seem to work because I don't see any framework file showing up.

Can someone help me figure out how to get rid of this error?

Community
  • 1
  • 1

1 Answers1

3

I assume you have got the latest version of the code either by doing hg clone http://hg.libsdl.org/SDL or by downloading the latest snapshot from https://www.libsdl.org/hg.php

This should give you a directory called SDL which contains the source and all of the projects. You will want to open 'Xcode/SDL/SDL.xcodeproj'

Then ensure the following is set as your build target - Framework > My Mac (64-bit) You can change it by clicking on it.

enter image description here

Then hit CMD+B (or select Product->Build from the menu) to build the framework. You will then be able to find the SDL2.framework in the following location:

/Users/*yourusername*/Library/Developer/Xcode/DerivedData/SDL2-*randomstring*/Build/Products/<*Debug/Release*>

Copy the framework to /Library/Frameworks

TPS
  • 2,067
  • 3
  • 23
  • 32