Hacker News new | ask | show | jobs
by schpaencoder 3177 days ago
Getting SDL2 to be recognized under MacOS is no joy
1 comments

correct. I figured out where the frameworks wanted to go -- and it even seems to match the path for -I, but that doesn't seem to be enough.

--

Yes, I have both frameworks installed. I even did the brew commands just for S&G ... same result after make command.

This is what I have under "/Library/Frameworks":

  antimass@gem:~$ ls /Library/Frameworks/SDL*
  drwxr-xr-x@  22 Sep 14:54 SDL2.framework
  drwxr-xr-x@   1 Feb  2016 SDL2_ttf.framework
  antimass@gem:~$
Wouldn't compile till I added in those SDL frameworks. Note: I also have done 'brew install sdl2' and 'brew install sdl2_ttf' in the past, so maybe you also need those?
brew will install SDL2 in a "unix" fashion, which should work if the makefile is written this way. The Framework version is the "Mac" way that is recognized by Xcode. The makefile for this project was created using the framework version.
Try; xcode-select install
I ended up changing the "cc" line for darwin to this: cc -o $@ $@.o -lSDL2 -lSDL2_ttf now it compiles (and runs) just fine (for me). YMMV