g++ linker: /usr/lib/libGL.so.1: could not read symbols: Invalid operation

前端 未结 2 1932
傲寒
傲寒 2021-01-04 14:10

I\'m trying to build a very simple OpenGL-app under Ubuntu 10.04 (I have a 32 bit system).

When I\'m trying to compile the file, I get the error message:

<         


        
2条回答
  •  灰色年华
    2021-01-04 14:46

    You need to include the opengl library on the command line as well as the glut library/. Try adding -lGL to the end of your command line

    g++ -L/usr/lib simple.cpp -lglut -lGL
    

提交回复
热议问题