shaunlebron / blinky

Exploring peripheral vision in games (using Quake)
MIT License
687 stars 26 forks source link

Mac binary can't find SDL2 #76

Closed shaunlebron closed 9 years ago

shaunlebron commented 9 years ago

from reddit

Immediately crashes on startup on OS X:
Dyld Error Message: Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2 Referenced from: /Users/USER/Documents/*/Blinky.app/Contents/MacOS/Launcher Reason: image not found

Reproduced the problem on my 10.8.5 by deleting /Library/Frameworks/SDL2.Framework on my machine. So Blinky.app is not using its bundled SDL2.Framework. Will have to look at how TyrQuake's Makefile bundle task is working.

Apple Documentation on Embedding Frameworks

nsabovic commented 9 years ago

@rpath is missing from the binary. I ran install_name_tool -add_rpath @executable_path/../Frameworks Blinky.app/Contents/MacOS/Launcher, that made it search for frameworks in Blinky.app/Frameworks directory in addition to /Library/Frameworks.

shaunlebron commented 9 years ago

Awesome :tada:

I'll check if this works later and will add it to the build process. Thanks!

shaunlebron commented 9 years ago

@nsabovic, updated download links. thanks again