作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在我的 kubuntu 64b 上启动 opengl 测试。安装了 Opengl、glew 和 freeglut,但是当我编译时它说找不到 glut。
CLEAN SUCCESSFUL (total time: 52ms)
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/rxp/NetBeansProjects/Cpptest'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/cpptest
make[2]: Entering directory `/home/rxp/NetBeansProjects/Cpptest'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++ -c -g -I../oglpg-8th-edition/include -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/cpptest build/Debug/GNU-Linux-x86/main.o -L../oglpg-8th-edition/lib -lGL -lGLEW -lGLU -lGLUT
/usr/bin/ld: cannot find -lGLUT
collect2: error: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/cpptest] Error 1
make[2]: Leaving directory `/home/rxp/NetBeansProjects/Cpptest'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/rxp/NetBeansProjects/Cpptest'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 358ms)
你能帮帮我吗?
最佳答案
您正在使用 -lGLUT。请注意,这些库区分大小写,因此您需要改用 -lglut。在构建命令中,库应该以这种方式链接:
-lGL -lGLEW -lGLU -lglut
关于c++ - 找不到 -lglut 但已安装 freeglut3-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17252326/
所以。 我对 Linux 开发世界有点陌生(没有 ide),所以请耐心等待。 问题 我构建了一个 make 文件,它将大约 7-8 个文件编译成 .o 文件,然后将这些文件与一些库链接在一起。我已经定
我正在尝试在我的 kubuntu 64b 上启动 opengl 测试。安装了 Opengl、glew 和 freeglut,但是当我编译时它说找不到 glut。 CLEAN SUCCESSFUL (t
我在尝试安装 mp4box 和运行 make lib 命令时遇到以下错误。 /usr/bin/ld: cannot find -lglut collect2: ld returned 1 exit s
这个问题在这里已经有了答案: The -l option in GCC (2 个答案) 关闭 5 年前。 我正在用 C 开发 GTK 程序,我有一个 makefile,我不知道这是什么编译器选项。
我是一名优秀的程序员,十分优秀!