【问题标题】:Statically link QML application with Qt5 (5.13.2)将 QML 应用程序与 Qt5 (5.13.2) 静态链接
【发布时间】:2020-04-08 16:49:28
【问题描述】:

我在 Linux 上编译了 Qt 5.13.2,代码如下:

/home/Qt/5.13.2/Src/configure -release -static -ltcg -optimize-size -opensource -confirm-license -platform linux-g++ -no-pch -nomake tools -nomake tests -nomake examples -skip webengine -prefix "/home/Qt/513-static"

然后我在 QtCreator 中创建了一个新工具包来使用这个编译。编译后,我试图运行,但我得到了错误

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland.

我的应用程序可以很好地使用动态链接。我应该更改 .pro 文件中的某些内容以使其与静态库一起使用吗?

我试图查看官方文档,但是这方面的信息很差。

【问题讨论】:

    标签: c++ qt static qml


    【解决方案1】:

    问题出在编译上。我使用以下行编译并且它工作:

    configure -release -static -optimize-size -opensource -confirm-license -feature-freetype -fontconfig -c++std c++2a -no-pch -nomake tools -nomake tests -nomake examples -skip webengine -recheck-all -platform linux-g++ -ltcg -xcb -prefix "/home/vinicius/Qt/Qt-static"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多