douhe3313 2013-07-16 10:49
浏览 333
已采纳

尝试使用pkg-config,但它不是已注册的命令

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.

  • 写回答

1条回答 默认 最新

  • duanchuonong5370 2013-07-16 13:29
    关注

    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%.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 iOS绕地区网络检测
  • ¥15 python验证码滑块图像识别
  • ¥15 根据背景及设计要求撰写设计报告
  • ¥15 QT6颜色选择对话框显示不完整
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥15 DS18B20内部ADC模数转换器