gpt4 book ai didi

c++ -/usr/bin/ld : cannot find -lGL (Ubuntu 14. 04)

转载 作者:IT王子 更新时间:2023-10-29 00:17:15 30 4
gpt4 key购买 nike

我正在尝试构建一个在 QT Creator 中创建的项目,但不幸的是,每次我尝试编译时都会遇到错误。这是我的编译器输出:

23:02:20: Running steps for project WallpaperAppQt...
23:02:20: Configuration unchanged, skipping qmake step.
23:02:20: Starting: "/usr/bin/make"
g++ -m64 -o WallpaperAppQt main.o mainwindow.o moc_mainwindow.o -L/usr/X11R6/lib64 -lQt5Widgets -L/usr/lib/x86_64-linux-gnu -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [WallpaperAppQt] Error 1
23:02:20: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project WallpaperAppQt (kit: Desktop)
When executing step 'Make'
23:02:20: Elapsed time: 00:00.

最佳答案

您需要一个提供libGL.so(无版本后缀)符号链接(symbolic link)的包。在 Ubuntu 中,它位于 libgl1-mesa-dev 包中。所以就这样做:

sudo apt install libgl1-mesa-dev

关于c++ -/usr/bin/ld : cannot find -lGL (Ubuntu 14. 04),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33447653/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com