Linux下快速静态编译Qt以及Qt动态/静态版本共存

本文提供了一种在40分钟内快速静态编译Qt的方法,包括下载源码、配置选项、指定编译部分等步骤,并介绍了如何在项目中启用静态编译。

     Qt下静态编译Qt,根据我的经验,如果按照Windows下那种直接拿官方sdk安装之后的文件来编译是行不通的,需要直接下载Qtsource包,目前诺基亚的源码叫做qt-everywhere-opensource-srctar包,到网上一查,乖乖,大部分人编译这个包居然花费了1213个小时!但是,根据我在Windows下静态编译Qt的经验,其实这之中很多东西都是可以不用编译的,最终我大约用了40分钟编译完成了全部内容。如果你直接使用官方的sdk安装,那么你就已经有了一个动态库,现在你又通过源码包编译,那么只要编译出静态库,因为你已经有动态库,你甚至只需要编译静态release库就足够了,谁会在平时编译的时候就要用那种浪费时间的静态编译?等到产品要部署到别的机器的时候,Qt需要用的时候连接上就可以了,这样其它的内容,如动态库的demoexamples都依旧可用,安装两个版本又不会花太多时间,岂不两全其美?长话短说,现在说安装步骤。

 

1. 到网上下载qt-everywhere源码包,

 

如果你只要库,那么你也可以到下面的网址找到你需要的版本。

 

http://www.qtcn.org/bbs/read.php?tid=1075

 

2. 解压缩到你的目标目录

 

3. 通过configure选择要编译的部分。

 

   你可以通过直接修改configure文件中的QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations",把examples,docs,demos都去掉(我只去掉了这三个,理论上如果安装了动态版本,toolstranslations(这个是linguist要用的)也是可以去掉的。你也可以通过在最终的configure指令中加入 –no-make ***(这里就是刚才提到的PARTS名字),而无需修改configure文件

 

  还有一些选项是默认的,你也可以指定选项。这些默认选项在大部分情况下都是没问题的,可是如果你的程序要部署到某些不确定的linux系统上,譬如有的系统连jpg,png的库都没有(这些在configure默认选项中使用的是系统库,如果系统没有这些库,岂不悲剧),那么你可以加入 –qt-gif  -qt-libpng –qt-libmng –qt-libjpeg几个选项。

 

  如果你决定只用静态库来做最终产品发布,那么你没有必要编译debug库,只需要编译release即可。

 

4. 使用configure生成makefile

 

  因为你不但想用自己编译的静态库,你还想能够用sdk自动安装的动态库以及那些demosexamples,为了能让两个Qt库共存,configure时必须为静态库制定一个与动态库所在位置不同的文件夹,例如我的sdk安装到 /opt/qtsdk-2010.05/下,那么我就在/opt下建立了一个叫qtstatic的文件夹来存放静态库,然后使用的configure命令:

 

./configure –prefix /opt/qtstatic –static –release。当然,我不喜欢看到满屏乱七八糟的输出,以及因为一个小错误突然终止了编译,所以又指定了以下选项:

 

-continue  当发生错误时,尽可能继续编译

 

-silent 进行make时只会显示警告和错误等,不会把编译指令也输出到屏幕上

 

当然,如果你最初没有通过修改configure文件的方式来删减编译模块,不要忘记加上-nomake选项,譬如你不想编译examples,就可以加上:

 

-nomake examples  ,依次类推

 

因为工程比较大,所以这个步骤可能会花费几分钟的时间。如果你指定编译的内容不是很多,应该可以很快完成。

 

5. 编译和安装

 

  最后当然就是makemake install了,不过不要忘了make还有多线程编译的功能哟!如果你的机器这段时间不打算做别的事情的话,完全可以加入以下选项:

 

-k  当发生错误时,尽可能继续编译

 

-j N  同时进行N项编译,建议N的值为你的CPU核数X1.5。当然,我选的值略微狠了点,我的电脑是奔腾双核T4300make指令为: make –k –j 4    ,然后我就看到系统监视器里CPU直接飙到100%了。

 

编译完成,make install就可以。当然,作为linux系统,需要注意文件夹的权限问题……呃,如果你不了解这个问题,我想你需要在linux上多下点儿功夫

 

6. 如何静态编译一个程序

 

  pro文件中,加入

 

  CONFIG +=static或者

 

  CONFIG +=staticlib,这个具体取决于你的工程类型了。

 

  这样Qt就会让编译器尽量寻找静态库来连接(包括Qt库之外的那些库),当然,这不排除Qt会静态连接一些会导致兼容性问题的库。这个在Qt Centre中有人提出了一个解法,如有需要可以查阅:

 

http://www.qtcentre.org/wiki/index.php?title=Building_static_applications

 

7. 动态/静态两个版本共存问题

 

  通常,你是不需要在系统变量中加入Qt库的位置的。Qt Creator可以自动扫描到系统中存在的Qt库版本,如果扫描不到,你可以通过CreatorTool->Options->Qt4中添加静态库的路径。而QDevelop虽然没有那么智能,你也可以手动指定INCLUDELIB的位置。或许,这根本就不是一个问题。如果你怀念动态库,或者在产品发布之前并不想体验静态编译那种蜗牛爬一般的速度,你可以在pro文件中指定CONFIG += shared,而且,要记得在Project中选择相应的版本。

 

8. 静态版本过大的问题

 

  首先,静态编译的Qt程序一个debug版程序150M左右,一个release版本10M左右,这样你知道为什么我不会编译静态debug库了吧?因为没有必要。你可以使用stripUPXWindows)等工具来压缩你生成的庞大程序。空间与速度从来都是一对冤家,Windows下静态编译出的程序,经过UPX压缩可以减少到原来的一般体积,但是启动速度也随之严重下降。当然,论程序启动速度,自己的设计和实现才是关键所在,最后发布的程序要不要压缩,那需要根据实际情况而定。

 

 

 

祝你与Qt相处愉快!

 

PS. configure阶段出现Basic XLib functionality test failed“的解决办法:

 

编译qt-x11-opensource-src-4.5.3是出现“Basic XLib functionality test failed“
解决方法:

 

此完整出错信息是在./configure阶段 Basic XLib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/linux-g++

 

config.test/x11/xlib 执行make命令,看出错信息 g++ -Wl,-O1 -o xlib xlib.o    -L/usr/X11R6/lib -lXext -lX11 -lm /usr/bin/ld: cannot find -lXext 可以看到,g++/usr/X11R6/lib下,找不到libXext.so

 

其原因就在于需要安装libX11的开发包,根据自己的系统特点,安装 libX11-dev libXext-dev libXtst-dev

 

对于Ubuntu,直接 sudo apt-get install libx11-dev libxext-dev libxtst-dev
问题解决!

 

Warning: Ignoring WAYLAND_DISPLAY on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. qt.core.plugin.factoryloader: checking directory path "/opt/Qt/5.15.2/gcc_64/plugins/platforms" ... qt.core.plugin.factoryloader: looking at "libqeglfs.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqlinuxfb.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqminimal.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqminimalegl.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqoffscreen.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqvnc.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqxcb.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqeglfs.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archlevel": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqlinuxfb.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archlevel": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqminimal.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archlevel": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqminimalegl.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archlevel": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqoffscreen.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archlevel": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqvnc.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archlevel": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqvnc.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqvnc.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqxcb.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archlevel": 0, "className": "QXcbIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-egl.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-generic.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-xcomposite-egl.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-xcomposite-glx.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqwebgl.so.debug" qt.core.plugin.factoryloader: "The shared library was not found." not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-egl.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archlevel": 0, "className": "QWaylandEglPlatformIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-generic.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland" ] }, "archlevel": 0, "className": "QWaylandIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-xcomposite-egl.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-egl" ] }, "archlevel": 0, "className": "QWaylandXCompositeEglPlatformIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqwayland-xcomposite-glx.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-glx" ] }, "archlevel": 0, "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: looking at "libqwebgl.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archlevel": 0, "className": "QWebGLIntegrationPlugin", "debug": false, "version": 331520 } qt.core.plugin.loader: In /opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwebgl.so: Plugin uses incompatible Qt library (5.15.0) [release] qt.core.plugin.factoryloader: "The plugin '/opt/Qt/5.15.2/gcc_64/plugins/platforms/libqwebgl.so' uses incompatible Qt library. (5.15.0) [release]" not a plugin qt.core.plugin.factoryloader: checking directory path "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms" ... qt.core.plugin.factoryloader: looking at "libqeglfs.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archlevel": 1, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs") qt.core.plugin.factoryloader: looking at "libqlinuxfb.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archlevel": 1, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb") qt.core.plugin.factoryloader: looking at "libqminimal.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archlevel": 1, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal") qt.core.plugin.factoryloader: looking at "libqminimalegl.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archlevel": 1, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl") qt.core.plugin.factoryloader: looking at "libqoffscreen.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archlevel": 1, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen") qt.core.plugin.factoryloader: looking at "libqvkkhrdisplay.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqvkkhrdisplay.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vkkhrdisplay" ] }, "archlevel": 1, "className": "QVkKhrDisplayIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay") qt.core.plugin.factoryloader: looking at "libqvnc.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archlevel": 1, "className": "QVncIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc") qt.core.plugin.factoryloader: looking at "libqwayland-egl.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqwayland-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archlevel": 1, "className": "QWaylandEglPlatformIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl") qt.core.plugin.factoryloader: looking at "libqwayland-generic.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqwayland-generic.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland" ] }, "archlevel": 1, "className": "QWaylandIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland") qt.core.plugin.factoryloader: looking at "libqxcb.so" qt.core.plugin.loader: Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archlevel": 1, "className": "QXcbIntegrationPlugin", "debug": false, "version": 395520 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb") qt.core.plugin.factoryloader: checking directory path "/opt/Qt/Tools/QtCreator/bin/platforms" ... qt.core.library: "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" cannot load: Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: libxcb-cursor.so.0: 无法打开共享对象文件: 没有那个文件或目录 qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: libxcb-cursor.so.0: 无法打开共享对象文件: 没有那个文件或目录" qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, xcb. 已放弃 (核心已转储)
最新发布
08-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值