我正在尝试构建一个在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(无版本后缀)符号链接的包.在Ubuntu中,它位于libgl1-mesa-dev包中.所以这样做:
原文链接:https://www.f2er.com/linux/440468.htmlsudo apt install libgl1-mesa-dev