且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Linux上安装Qt,找不到-lGL

更新时间:2023-11-17 08:24:04

好,它正在尝试与libgl链接,但未找到它.您应该安装 libgl-dev .

Well it is trying to link with libgl and doesn't find it. You should install libgl-dev.

-l是链接器选项,它告诉链接器使用某个库. 例如,您可以具有-lmagic的含义,即您想使用 libmagic .

-l is a linker option, it tells the linker to use a certain library. For example you can have -lmagic meaning that you want to use libmagic.

通常所有库都称为libsomething,在debian上,您会发现3个软件包: 淫荡的东西 libsomething-dbg libsomething-dev

Normally all libraries are called libsomething, and on debian you will find 3 packages called: libsomething libsomething-dbg libsomething-dev

第一个是库,第二个是使用调试符号编译的库,因此您可以更轻松地理解堆栈跟踪,最后一个是开发包,它包含.h文件,因此您可以链接到库.

The 1st one is the library, the second one is the library compiled with the debug symbols, so you can make sense of stacktraces more easily, and the final one is the development package, it contains the .h files so you can link to the library.