为 Windows 10 构建 GTK 4 库时出现问题

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

我需要使用 GTK 4 库来创建我的程序的 GUI,我需要将其包含在 Microsoft Visual Studio C++ 项目中。

我使用 Windows 10 64 位。

所以在网上查了一下,我唯一发现的那个我的特罗卡托就是这个。

我执行了指南中描述的所有步骤:

  1. 我安装了Python(V.3.11.4)
  2. 我已经安装了GIT
  3. 我打开了“VS 2022 的 x64 Native Tools 命令提示符”
  4. 我创建了 src 文件夹
  5. 我进入了src文件夹
  6. 我配置(登录)了git
  7. 我使用pip安装了Meson
  8. 我从 git 获取 GTK
  9. 我进入了之前创建的gtk文件夹
  10. 我尝试构建 GTK 4 及其所有依赖项,这就是我遇到问题的地方

确实执行命令后:

meson setup build --prefix C:/gnome
.

我发现有些库还没有找到,作为某些结果的值我得到NO(我不知道这是否正常),并且我在最后得到以下错误:

modules\media\meson.build:42:16: ERROR: Dependency lookup for gstreamer-player-1.0 with method 'pkgconfig' failed: Pkg-config binary for machine 1 not found. Giving up.

我将所有输出放入this文本文件中。

我尝试多次重新执行所有步骤,但仍然遇到相同的错误,我也尝试继续执行相同的操作,然后运行命令:

meson compile -C build
,但出现以下错误:

C:\src\gtk>meson compile -C build

ERROR: Current directory is not a meson build directory: `C:\src\gtk\build`.
Please specify a valid build dir or change the working directory to it.
It is also possible that the build directory was generated with an old
meson version. Please regenerate it in this case.
gtk
1个回答
0
投票

正如错误消息所示,您需要 Pkg-config 二进制文件作为依赖项。检查这个答案

© www.soinside.com 2019 - 2024. All rights reserved.