【问题标题】:Cannot find -lglut but freeglut3-dev is installed找不到 -lglut 但已安装 freeglut3-dev
【发布时间】:2013-06-22 15:28:53
【问题描述】:

我正在尝试在我的 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)

你能帮我吗?

【问题讨论】:

    标签: c++ opengl glut freeglut


    【解决方案1】:

    您正在使用 -lGLUT。请注意,这些库区分大小写,因此您需要改用 -​​lglut。 在构建命令中,库应该以这种方式链接:

    -lGL -lGLEW -lGLU -lglut
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-06
      • 2014-09-30
      • 2021-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-01
      相关资源
      最近更新 更多