I find this to be quite frustrating on macOS. Since my game was built using GLUT, the time to replace it with freeglut has come. So I downloaded the source code and built it via terminal (make). Now, my question is this, how would I include the .dylib file into my .app package? I tried moving the .dylib to a specific library directory within my game's codebase folder, and tried adding that copy of the .dylib to my Build Phases to do an automatic copy to my Executables location. But when I do that, I get an error about the the library not being found. I really don't want to expect the user of my game to have freeglut installed prior to playing my game on macOS, so I really want to find some way to package freeglut with my game. I also want to do this with OpenAL-Soft as I am having the same issue there.
To be specific with the error, this is what it says:
dyld: Library not loaded: /usr/local/lib/libglut.3.dylib
Referenced from: /Users/XXX/Library/Developer/Xcode/BlahBlah/MyGame.app/Contents/MacOS/MyGame
Reason: Image not found
I've had alot of trouble with this, and still can't quite figure out how to fix it. There's one more thing I want to note about this. After building the freeglut library, the resulting .dylib file(s) ended up in a different directory:
/usr/X11/lib/
Do I need to create a symbolic link to this directory or something? I don't fully understand how symbolic links work, and it's a little confusing to me. What would it take to get my .dylib independent of these directories so I can distribute the .app file without having to depend on the user to already have it installed? I'm used to how Windows does things with it's .dll files; just stick 'em in the executable directory and go from there.
Shogun.
To be specific with the error, this is what it says:
dyld: Library not loaded: /usr/local/lib/libglut.3.dylib
Referenced from: /Users/XXX/Library/Developer/Xcode/BlahBlah/MyGame.app/Contents/MacOS/MyGame
Reason: Image not found
I've had alot of trouble with this, and still can't quite figure out how to fix it. There's one more thing I want to note about this. After building the freeglut library, the resulting .dylib file(s) ended up in a different directory:
/usr/X11/lib/
Do I need to create a symbolic link to this directory or something? I don't fully understand how symbolic links work, and it's a little confusing to me. What would it take to get my .dylib independent of these directories so I can distribute the .app file without having to depend on the user to already have it installed? I'm used to how Windows does things with it's .dll files; just stick 'em in the executable directory and go from there.
Shogun.