Why won't this GLUT program compile? Am I missing libraries or headers?

前端 未结 2 1720
礼貌的吻别
礼貌的吻别 2021-01-15 16:50

I\'ve just started using Linux (Mint 11), and recently, I decided to take up OpenGL programming as a hobby. I\'m finding the code and techniques relatively simple enough, ho

2条回答
  •  温柔的废话
    2021-01-15 17:04

    be sure you have installed libglew-dev and freeglut3-dev with

    sudo apt-get install libglew-dev freeglut3-dev
    

    and then link to this libs in your Makefile or compile command with

    -lglut -lGLEE
    

    for example

    g++ -lglut -lGLEW -o test main.cpp
    

    (this is how I compiled your example)

提交回复
热议问题