Reputation: 263
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 found in a tutorial. But I got the error message:
"The path you entered seems valid, but this wizard can't locate the following GLUT's library file: glut in it."
Did I set the right location? What is the right way to setup up such a glut project?
Upvotes: 5
Views: 15900
Reputation: 463
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.
Upvotes: 0
Reputation: 61
GLEW, GL, GLU, glut
Add these one by one to your project's link libraries after installing them.
Upvotes: 1
Reputation: 192
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.
Upvotes: 1
Reputation: 1
You should try /usr/local
location if you were executing ./configure
and installation with default parameters
Upvotes: 0
Reputation: 2663
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.
Upvotes: 2