Setup up GLUT projects in Codeblocks (Ubuntu 12.04)

后端 未结 5 1757
无人共我
无人共我 2021-01-03 03:33

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

相关标签:
5条回答
  • 2021-01-03 03:48

    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.

    0 讨论(0)
  • 2021-01-03 03:49

    GLEW, GL, GLU, glut

    Add these one by one to your project's link libraries after installing them.

    0 讨论(0)
  • 2021-01-03 03:51

    You should try /usr/local location if you were executing ./configure and installation with default parameters

    0 讨论(0)
  • 2021-01-03 04:03

    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.

    0 讨论(0)
  • 2021-01-03 04:08

    I was facing the same problem. Doing two things solved my problem.

    1. 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.)

    2. 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.

    0 讨论(0)
提交回复
热议问题