从https://www.gtk.org/docs/getting-started/hello-world/获取gtk示例的错误编译示例>

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

嗨,我正在尝试从官方网站编译gtk的Hello World。我完成了所有要求的工作,并通过msys2软件包管理器安装了GTK。我的cmd无法检测到package-config目录。我已经在环境变量上为我的msys264设置了路径。我很抱歉,如果初学者时听起来有点困惑。 TQ。

C:\Users\60182\Desktop\vc>gcc `pkg-config --cflags gtk+-3.0` -o hello-world-gtk hello-world-gtk.c `pkg-config --libs gtk+-3.0`

gcc: error: `pkg-config: No such file or directory
gcc: error: gtk+-3.0`: No such file or directory
gcc: error: `pkg-config: No such file or directory
gcc: error: gtk+-3.0`: No such file or directory
gcc: error: unrecognized command-line option '--cflags'
gcc: error: unrecognized command-line option '--libs'

嗨,我正在尝试从官方网站编译gtk的Hello World。我完成了所有要求的工作,并通过msys2软件包管理器安装了GTK。我的cmd无法检测到package-config目录。我...

c gtk3 msys2
1个回答
0
投票

我可以看到问题。 Windows Shell无法像Linux Shell一样工作。反引号字符用于将一个命令的输出作为参数传递给另一命令。

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