Saturday, August 27, 2011

using glfw on os x xcode

download it

make cocoa
sudo make cocoa-install

In Xcode, you just need to specify where the user library and user include folders are. Go to Project -> Edit Active Target. In there, you should see a number of fields under search paths. Under the 'Header Search Path' add '/usr/local/include/' without quotes. Under the Library Search Path, add '/usr/local/lib'.

Under Linking, go to Other Linker Flags and add the flag -lglfw .

Under architectures, change architectures to 64-bit intel

add libglfw.dylib to the project by dragging the file into XCode

for some reason had to copy libglfw.dylib to /build/Debug/. to get it to run under the debugger. wtf?