VLC 构建系统未找到 Qt5

问题描述 投票:0回答:1

我正在尝试在 Ubuntu 机器上编译 VLC。因此,在获得构建所需的所有附加包后,当我运行

./configure
时,它说未找到 Qt5Core 以及其他一些 Qt 相关库。问题是我知道 Qt5 及其库的完整安装在我的系统上的主目录而不是全局目录中可用。构建时,pkg-config 似乎不检查主目录。如何将 Qt5 安装的实际位置告知构建系统?

注意:我尝试从 apt 源下载 Qt,但该安装适用于 Qt5.9,而不是所需的 Qt5.11。

qt5 vlc pkg-config vlc-qt
1个回答
0
投票

configure
需要找到Qt模块的
.pc
文件,
如果你检查
config.log
,它可能会抱怨:

configure:xxxx: $PKG_CONFIG --exists --print-errors "Qt5Core >= 5.11.0 Qt5Widgets Qt5Gui Qt5Quick Qt5QuickWidgets Qt5QuickControls2 Qt5Svg"

Package Qt5Quick was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Quick.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Quick' found
Package Qt5QuickWidgets was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5QuickWidgets.pc'
to the PKG_CONFIG_PATH environment variable

在那里,要将

configure
链接到特定的 Qt 安装,您有几个选项, 导出变量
QT_LIBS

export QT_LIBS=/path/to/qt/libs/

或者,直接将包含

pkgconfig
文件的 Qt
.pc
路径添加到 shell
PKG_CONFIG_PATH
,

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/path/to/qt/libs/pkgconfig/
© www.soinside.com 2019 - 2024. All rights reserved.