I installed the freeglut3 and freeglut3-dev by apt-get. I want to create a OPENGL GLUT Project in Codeblocks. I was asked the GLUT\'s location and I entered \"/usr\" as I fo
I have also faced the same problem. But I solve the problem Without creating the project and run the GLUT program. For that go to compiler and debugger setting and in linker tab and link library libGL.so , libGLU.so, libglut.so form directory usr/lib by pressing add button. Now you can include glut.h header and run the project.
GLEW, GL, GLU, glut
Add these one by one to your project's link libraries after installing them.
You should try /usr/local
location if you were executing ./configure
and installation with default parameters
I am assuming you already have glut installed.
Open codeblocks and select Opengl project. While inside go to settings -> compiler -> linker settings -> link libraries Add glut GL and GLU one by one separately.
Your code should run.
I was facing the same problem. Doing two things solved my problem.
I added GL
, GLU
, glut
one by one to my project's link libraries. (When I tried to add GLEW
, it showed error. I didn't add GLEW
and it didn't cause any problem.)
I used the line #include <GL/glut.h>
to include the header file glut.h
. #include <GLUT/glut.h>
or #include <glut.h>
was showing me fatal error that header file not found.