How to install pkg config in windows?

≯℡__Kan透↙ 提交于 2019-11-26 02:35:16

问题


I am trying to do it, but all I can get is some source code that I don\'t know how to do deal with I downloaded from http://pkgconfig.freedesktop.org/releases/ .

Any help?


回答1:


Get the precompiled binaries from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/

Download pkg-config and its depend libraries :

  • pkg-config_0.26-1_win32.zip
  • glib_2.28.8-1_win32.zip
  • gettext-runtime_0.18.1.1-2_win32.zip



回答2:


This is a step-by-step procedure to get pkg-config working on Windows, based on my experience, using the info from Oliver Zendel's comment.

I assume here that MinGW was installed to C:\MinGW. There were multiple versions of the packages available, and in each case I just downloaded the latest version.

  1. go to http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
  2. download the file pkg-config_0.26-1_win32.zip
  3. extract the file bin/pkg-config.exe to C:\MinGW\bin
  4. download the file gettext-runtime_0.18.1.1-2_win32.zip
  5. extract the file bin/intl.dll to C:\MinGW\bin
  6. go to http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28
  7. download the file glib_2.28.8-1_win32.zip
  8. extract the file bin/libglib-2.0-0.dll to C:\MinGW\bin

Now CMake will be able to use pkg-config if it is configured to use MinGW.




回答3:


A alternative without glib dependency is pkg-config-lite.

Extract pkg-config.exe from the archive and put it in your path.

Nowdays this package is available using chocolatey, then it could be installed whith

choco install pkgconfiglite



回答4:


I did this by installing Cygwin64 from this link https://www.cygwin.com/ Then - Wiew Full, Search gcc and scroll down to find pkg-config. Click on icon to select latest version. This worked for me well.




回答5:


Another place where you can get more updated binaries can be found at Fedora Build System site. Direct link to mingw-pkg-config package is: http://koji.fedoraproject.org/koji/buildinfo?buildID=354619



来源:https://stackoverflow.com/questions/1710922/how-to-install-pkg-config-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!