简体   繁体   English

在Ubuntu上编译QScintilla失败

[英]Compiling QScintilla on Ubuntu Fails

I'm trying to compile Qscintilla 2.9.2 on Ubuntu 16.04 64bit using Qt 5.7 got the following error message: 我正在尝试使用Qt 5.7在Ubuntu 16.04 64bit上编译Qscintilla 2.9.2,得到以下错误消息:

-L/home/mwambi/Qt5.7.0/5.7/gcc_64/lib -lQt5PrintSupport -L/usr/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lpthread -lGL  
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:979: recipe for target 'libqscintilla2.so.12.0.1' failed
make: *** [libqscintilla2.so.12.0.1] Error 1

I do not know what the library GL is and where to find it. 我不知道什么是图书馆GL,以及在哪里可以找到它。 How can I solve this? 我该如何解决?

In my experience, this troubleshooting procedure is enough to solve about 90% of missing library issues during compilation: 以我的经验,此故障排除过程足以解决编译期间约90%的缺少库问题:

  1. "-l[name]" implies there's a "lib[name].so" “ -l [name]”表示存在一个“ lib [name] .so”

  2. Search your system for "lib[name]" (use locate or find). 在系统中搜索“ lib [name]”(使用定位或查找)。

    If you find it on your system, check paths ($LB_LIBRARY_PATH and the build system's -L flags) and verify that the architecture matches (x86+64 vs. i686). 如果在系统上找到它,请检查路径($ LB_LIBRARY_PATH和构建系统的-L标志)并验证体系结构是否匹配(x86 + 64与i686)。

  3. Do a repository search for "lib[name]" (use apt, yum, synaptic, &c.). 在存储库中搜索“ lib [name]”(使用apt,yum,synaptic等)。

    Install it if it's missing. 如果缺少它,请安装它。

  4. Type "lib[name].so" into google or a dedicated package-search site (like RPMFind or packages.ubuntu.com) and see what package names come up, then search for as in #2-3. 在Google或专用的软件包搜索网站(例如RPMFind或packages.ubuntu.com)中输入“ lib [name] .so”,然后查看出现的软件包名称,然后按照#2-3进行搜索。

In this case, libGL is an implementation of OpenGL. 在这种情况下,libGL是OpenGL的实现。 You can install Mesa or find an alternative implementation (I've only ever used Qt with Mesa). 您可以安装Mesa或找到其他实现(我仅在Mesa中使用过Qt)。 Here's a list of packages that provide libGL ; 这是提供libGL的软件包的列表 if you already have one of these installed on your system, try fetching the dev versions of whichever ones you already have. 如果您的系统上已经安装了其中之一,请尝试获取已有的开发版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM