我想在Ubuntu 10.04(我有一個32位系統)下構建一個非常簡單的OpenGL應用程序。g ++鏈接器:/usr/lib/libGL.so.1:無法讀取符號:無效操作
當我試圖編譯文件,我得到錯誤信息:
g++ -L/usr/lib simple.cpp -lglut
/usr/bin/ld: /tmp/ccoPczAo.o: undefined reference to symbol 'glEnd'
/usr/bin/ld: note: 'glEnd' is defined in DSO //usr/lib/libGL.so.1 so try adding it to the linker command line
//usr/lib/libGL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
有誰知道我做錯了嗎?
不是真的關係到你的問題,但我看到你正在使用glEnd(),因爲GL3它被廢棄了。如果你開始使用OpenGL編程,我建議你從「核心配置文件」開始使用GL3 +。舊的OpenGL不僅速度慢,而且非常有限。 – glampert 2014-03-29 18:26:11