Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing GLEW and using it with Xcode

So I already downloaded the lastest glew v. 1.9 from the site and make it in the terminal, what I cant figure out is how to add it successfully to a GLUT OpenGL Xcode project. I can add the OpenGl and GLUT frameworks very easily but I cant find any glew frameworks or something similar.

Main problem is that one of my files has #include GL/glew.h and it cant find it.

like image 531
Patricio Jerí Avatar asked Mar 08 '26 17:03

Patricio Jerí


1 Answers

While using 'Frameworks' is the Apple way of doing things, XCode will let you specify header paths and a shared library (as is the convention in Nixlike environments).

1) Go to your target's properties, 2) look for header search paths field and add your Glew headers to that. 3) Then look for the GLEW shared library (typically a '.a' or '.so' file) in the directory where you compiled GLEW. Add this directory to your target's library search paths and 4) then finally link against this library in your dependencies list.

like image 187
balajeerc Avatar answered Mar 10 '26 15:03

balajeerc