I will suggest installing glfw via homebrew http://brew.sh/
The advantage being you can always uninstall it neatly by doing brew uninstall glfw3
!
You need to have the "Command Line Tools for Xcode" and Xcode install https://github.com/Homebrew/homebrew/wiki/Installation
xcode-select --install
Once Homebrew is installed, open the terminal and run
brew update
brew tap homebrew/versions
brew install glfw3
for glfw3 OR
brew install glfw2
for glfw2
Also, if you desire an static build, use the flag --static
brew install --static glfw3
The libraries and include files will be available at usr/local/lib
and usr/local/include
Now, if you have a program that relies in opengl and glfw, you'd want to compile it something like this:
gcc program.c -o myapp -framework OpenGl -lglfw3
(or -lglfw2)
If you still have some problems with the glfw header file, you can do:
gcc program.c -o myapp -framework OpenGl -I/usr/local/include -lglfw3
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…