Hi folks! Five or six years ago I bought some books and started learning to code. I created several SDL-based games, but then I got a new job and I really didn’t have time for it anymore. Anyway, the point is I really miss it and I want to run my old games, but I’m on a different computer now, with a different OS (macOS High Sierra) and a different version of Xcode (v 9.4.1). When I try to run my games, I get the message “‘SDL/SDL.h’ file not found” which I assume is because I haven’t set up SDL 1.2 on this computer. Unfortunately the tutorial I had used to set it up originally is gone now (Lazy Foo), and in its place are instructions for running SDL Version 2. Could someone direct me to a good tutorial for this, or is it not possible because version 1.2 is too old? I sure hope not!
homebrew still distributes SDL1.2.
But Apple breaks more and more stuff with every update.
If you can, switch to SDL 2
Thanks. I do have SDL 1.2. I just need to find some instructions on setting it up.
Okay, so setting up the SDL 1.2 frameworks turned out to not be that difficult, but in my Xcode project, the Cocoa.framework still appears in red text. I assume that means it’s not found. I think I remember something about how to fix this in the tutorial I read back in 2014, but I don’t really remember. Can someone help? Thanks!
I finally got my code to run. The only problem is that the game window is completely black. I can hear that the game is running though; I can hear all the music and sound effects, and I can hear it responding to my keyboard input. So now all I need to do is get the graphics to appear. I get the sense that everyone here has moved on and isn’t interested in v1.2 anymore, but I’d sure love to get my game up and running again! Any help would be greatly appreciated!
P.S. I googled this warning message that I got in the console, “CGColorSpace does’t support output”, and found that this is an issue with macOS Sierra in both SDL 1.2 and SDL 2. Is anyone familiar with this issue? I’m guessing that any updates to fix this would probably only be for SDL 2…
As somebody else said, you should really switch to SDL2. SDL 1.2 hasn’t seen any major development in quite a long while. And the list of things that no longer work in SDL 1.2 on modern macOS versions will only grow over time.