急求 ubuntu 安装opengl问题?
用命令sudoapt-getinstallmesa-common-devmesademoslibgl1-mesa-devlibglu1-mesa-devfreeglut3...
用命令sudo apt-get install mesa-common-dev mesademos libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev装好opengl后,我编译了一个很简单的例子test.c,用gcc -o test test.c -lglut -lGLU编译,出现如下错误:
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XFreeDeviceList'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XListInputDevices'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XSelectExtensionEvent'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XOpenDevice'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XmuLookupStandardColormap'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XQueryDeviceState'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XGetExtensionVersion'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XFreeDeviceState'
请问这是什么问题啊???
我重装了一个更低版本的freeglut3-dev,后来能编译通过,但是运行时:
symbol lookup error: /usr/lib/libglut.so.3: undefined symbol: XmuLookupStandardColormap
这又是怎么回事啊???? 展开
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XFreeDeviceList'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XListInputDevices'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XSelectExtensionEvent'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XOpenDevice'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XmuLookupStandardColormap'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XQueryDeviceState'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XGetExtensionVersion'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libglut.so: undefined reference to `XFreeDeviceState'
请问这是什么问题啊???
我重装了一个更低版本的freeglut3-dev,后来能编译通过,但是运行时:
symbol lookup error: /usr/lib/libglut.so.3: undefined symbol: XmuLookupStandardColormap
这又是怎么回事啊???? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询