pkg-config for MSys with Minimal Fuss

2011-02-16

 

pkg-config is a really neat tool that makes life so easy on GNU/Linux systems. If you ever needed to write a configure script, now there is a (almost standard) way to check for dependencies. Oh the joy! Until you move to MinGW and MSys on Windows. You will find out that there is no binary from the guys at MinGW. You will also find out that to build pkg-config, you need glib, which needs pkg-config to configure some dependencies. There are mailing lists full of epic tales of people trying to build pkg-config from source. You just want to use pkg-config. It is bad enough that you need to build you software, you should not need to build other peoples software! The good news, getting pkg-config with minimal fuss is possible. Let me show you how.

What is really nice, the people at Gtk+ have all the libraries precompiled in seperate zip archives. Head over to http://www.gtk.org/download-windows.html. You will need the glib run-time, the gettext-runtime run-time and obviously pkg-config tool and dev. No less no more. Unzip each folder to your root of your MSys installation.

That's it.