Xcode and GLFW

nobody wrote on Sunday, May 20, 2007:

I am setting up GLFW in Xcode for the first time and I am stuggling with getting everything set up correctly. I’ve included AGL, Carbon, and OpenGL frameworks; as well as libglfw.a… I’ve set the library search paths to the glfw/lib/macosx folder, but I am getting the following error when compiling a tutorial lesson:

[Session started at 2007-05-20 08:02:29 -0400.]
dyld: Library not loaded: @executable_path/libglfw.dylib
Referenced from: /Users/pjstudio/secondtry/build/Release/XcodeGLFW.app/Contents/MacOS/XcodeGLFW
Reason: image not found

XcodeGLFW has exited due to signal 5 (SIGTRAP).

I am not sure what the issue is at this point, as search for this error online has not revealed much.
Could someone point me in the right direction!
Thank you!

Paul

elmindreda wrote on Thursday, May 24, 2007:

I really can’t say without more context or details and neither can anyone else, it seems.

nobody wrote on Sunday, September 09, 2007:

I ran into the same problem. Very annoying.

It can be fixed by copying the libglfw.dylib into your .app/Contents/MacOSX/ folder. It will be removed if you do a clean build. Dont know how to make XCode do this automatically.

elmindreda wrote on Friday, September 14, 2007:

You’re linking against the dynamic version of the GLFW library. If possible, use the installation make target of GLFW, i.e.

$ sudo make macosx-install

as detailed in the redame.html file. This will put the static library (but not the dynamic one) and the header file in places where GCC will automatically find them. Then you can remove the explicit search paths to your local copy of the GLFW source tree.

Hope that helps.