尝试使用pkg-config,但它不是注册命令 [英] Trying to use pkg-config but it not being a registered command

查看:2667
本文介绍了尝试使用pkg-config,但它不是注册命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我已经在Windows 8下使用了我的整个Go开发环境,也使用了MinGW。我使用 LiteIde

  C:/Go/bin/go.exe build [ C:/ Users / Alyx / Go / Hi] 
pkg-config --cflags sdl
exec:pkg-config:在%PATH%
中找不到可执行文件错误:process exited与代码2.

但是然后我得到一个错误pkg-config,起初我没有没有安装。 (我试图用列出全屏模式的测试来编译SDL绑定)

然后我将它全部设置在C:\ MinGW \ Bin文件夹(pkg-config.exe和额外的dll)。



但它仍然不起作用。进入CMD的名字not recognized as internal ...。

然后我想我必须把一个环境变量放到Windows中。我用C:\ MinGW \ bin值尝试%PATH%。没有。然后我尝试了PKG_CONFIG_PATH。没有。



所以我不确定我需要什么环境变量,或者是否有任何可以放入LiteIde的变量。

解决方案

从错误中,听起来像您尝试添加 C:\MinGW\bin %PATH%变量未成功。



确保将它添加到控制面板\所有控制面板项目\系统下的系统环境变量,点击高级系统设置高级选项卡,环境变量... 按钮并编辑<$ 系统变量(Add ; C:\ MinGW\bin 下的c $ c> Path $ c>到现有值的末尾)。然后重新启动你的shell或IDE来应用系统设置。


$ b $

如果 pkg-config.exe code> C:\MinGW\bin 文件夹将会在%PATH%中找到。


Ok so I've got my whole Go development environment up under Windows 8, also with MinGW. I'm using the LiteIde.

C:/Go/bin/go.exe build  [C:/Users/Alyx/Go/Hi]
pkg-config --cflags sdl
exec: "pkg-config": executable file not found in %PATH%
Error: process exited with code 2.

But then I get an error for "pkg-config" which at first I didn't have installed. (I'm trying to compile the SDL binding with a test that lists the fullscreen modes)

Then I got it all set up in the C:\MinGW\Bin folder (pkg-config.exe and the extra dll's).

But then it still wouldn't work. Went into CMD typed in its name "not recognized as internal..."

So then I figured I must need to put an environment variable into Windows. I tried %PATH% with the "C:\MinGW\bin" value. Nothing. Then I tried PKG_CONFIG_PATH. Nothing.

So I'm not sure what Environment Variable I need, or if there is any sort of variable I can put into LiteIde. Other than that idk what else to do.

解决方案

From the error, it sounds like your attempt to add C:\MinGW\bin to the %PATH% variable was unsuccessful.

Make sure you're adding it to the System Environment Variables under Control Panel\All Control Panel Items\System, Click on Advanced System Settings, Advanced tab, Environment Variables... button and edit the Path entry under System variables (Add ;C:\MinGW\bin to the end of the existing value). Then restart your shell or IDE to apply the system settings.

If pkg-config.exe is in the C:\MinGW\bin folder it will be found in %PATH%.

这篇关于尝试使用pkg-config,但它不是注册命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆