我尝试编译这个小 示例,但执行 make 时出现此错误:
g++ -o ogl_cs_example main.cpp opengl_cs.cpp opengl_util.cpp -Wall -Iinclude -lX11 -lGL -lGLU
/tmp/ccFLIOt2.o: In function `updateTex(int)':
main.cpp:(.text+0xc6): undefined reference to `glDispatchCompute'
/tmp/ccQ8pShN.o: In function `genTexture()':
opengl_util.cpp:(.text+0x3df): undefined reference to `glBindImageTexture'
/tmp/ccQ8pShN.o: In function `initGL()':
opengl_util.cpp:(.text+0x7dd): undefined reference to `glXCreateContextAttribsARB'
collect2: error: ld returned 1 exit status
make: *** [example] Error 1
我错过了什么?