【问题标题】:What is the path to Qt, and path to Qt's configure file on UbuntuQt 的路径是什么,以及 Qt 在 Ubuntu 上的配置文件的路径
【发布时间】:2018-09-10 17:10:13
【问题描述】:

我正在关注this 部署文档。它需要我指定/path/to/Qt/path/to/Qt/configure。我无法在我的机器上找到 Qt 的路径。

我正在使用Ubuntu 17,并且我使用apt install qt5-default 安装了Qt。知道在 Ubuntu 上哪里可以找到它,或者如何找到它?

编辑:我在/usr/lib/x86_64-linux-gnu/qt5/ 找到了qt5,但它没有configure 文件。

【问题讨论】:

  • configure 是源代码中的一个文件,如果是 ubuntu 提供的 Qt,它将没有,因为使用 apt-get 安装二进制文件。如果你想使用configure你必须下载Qt源代码:code.qt.io/cgit/qt/qt5.git

标签: qt ubuntu qt5


【解决方案1】:

您可以从 Git 获取 Qt 源代码并关注 Building Qt 5 from Git。您还可以下载源代码压缩包,例如Qt 5.10.1 或从here 中选择其他版本。

将源提取到您的首选位置,例如/home/用户/qt。因此,您的来源位于 /home/user/qt/qt-everywhere-src-5.10.1。为了保持源代码干净,请创建单独的构建和安装目录,例如/home/user/qt/build 和 /home/user/qt/install。

转到构建目录:

cd /home/user/qt/build

从您的构建目录运行配置并使用 -prefix 提供安装目录:

../qt-everywhere-src-5.10.1/configure -static -prefix /home/<user>/qt/install <other parameters>

其中“其他参数”是例如

-release -nomake examples -nomake tests -skip qtwebengine

(如果您不需要 qtwebengine 以节省大量构建时间,请跳过它)

【讨论】:

    猜你喜欢
    • 2014-10-05
    • 1970-01-01
    • 2020-12-14
    • 2011-11-09
    • 1970-01-01
    • 2014-07-13
    • 1970-01-01
    • 2014-09-16
    • 1970-01-01
    相关资源
    最近更新 更多