Building glew for Mac OSX

DavidColson picture DavidColson · Sep 1, 2012 · Viewed 40.1k times · Source

I have spent the day struggling to get my simple engine to work on Mac. I have SDL working and now the only thing giving trouble is opengl. The engine uses modern opengl (shader based) and so requires GLEW. I have tried everything from fink to MacPorts to install it and nothing works.

The most success I have had has been building it from source. First I got an error saying 'GL/glu.h' no such file or directory found. So I renamed the includes to OpenGL/glu.h and that fixed that issue. But now I get this error ld: unknown option: -shared I am completely stuck at this point.

Also Id rather a static build if anyone knows how to do that.

Answer

yihangho picture yihangho · Aug 14, 2013

You can use Homebrew to do the work for you:

brew install glew