I've recently downloaded the gtk+ all-in-one bundle downloaded from the GTK+ website, which works fine and allows me to build gtk+ applications on Windows using the MinGW compiler.
However, when now looking at the *.pc files for pkg-config in lib/pkgconfig, I noticed something weird. Here's how the beginning of glib-2.0 looks like:
prefix=c:/devel/target/059c48de6b739307c37648aba3005b29
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
My gtk+ folder resides on a different drive than C:\ and I don't have a C:\devel folder at all. So what does this prefix stand for? What prefix would I use if I decided to write a *.pc file for easily linking my own application?
Surprisingly enough, using pkg-config works as expected and returns the correct path the libraries and headers inside the gtk+ folder.
The version of pkg-config that comes with the all in one package basically ignores the prefix. It knows to look in ../lib/pkgconfig for the pkg-config files. You don't need to do anything special for your pkgconfig files other than either put them in that pkgconfig directory, or set some environment variables so pkg-config knows where to look for your *.pc files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With