[pkg-config] Glib not found

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Mar 31 10:42:43 PDT 2010


On 2010-03-31 17:39+0100 Vincenzo Urso Miano wrote:

> Hello,
>
> I changed my installation directory to c:\plplot.
> The content of plplotd-f77.pc is the following:
> ------------------------------------------
> libdir=C:/plplot/lib
> includedir=C:/plplot/include/plplot
> drvdir=C:/plplot/lib/plplot5.9.5/driversd
>
> Name: PLplot F77
> Description: Scientific plotting library (F77 bindings, double precision)
> Requires: plplotd
> Version: 5.9.5
> Libs: -L${libdir} -lplplotf77d -lplplotf77cd
> Cflags: -I${includedir}
> ------------------------------------------

This looks OK to me, but I am also (especially) interested
in the contents of plplotd.pc as well (which are requested in the above
file by the Requires: line).

>
> The first three directory are correct. I can't judge about the following things.
>
> Executing, in either win-bash or cmd:
> set PKG_CONFIG_PATH=C:/GTK/Glib/bin
> pkg-config --libs --cflags plplotd-f77
> gives me the libglib-2.0-0.dll not found error.

Just to give some general bug-reporting advice it is better to cut and paste
the exact command you used (as above) and _also_ (a) the directory where
you ran the command, and (b) the complete results of the command
rather than summarizing/paraphrasing just the error message part of
the results.

>
> To clarify the content of c:\gtk\glib\bin is the following:
> gspawn-win32-helper-console.exe
> gspawn-win32-helper.exe
> libgio-2.0-0.dll
> libglib-2.0-0.dll
> libgmodule-2.0-0.dll
> libgobject-2.0-0.dll
> libgthread-2.0-0.dll
>
> Can you please confirm I am using the correct stuff? Do I need a
> lib\pkgconfig folder in c:\gtk\glib?

Note someone else's comment in this thread which I will repeat:

>>> I'm just guessing, but you need to get the glib-2.0.pc file in the
>>> pkg-config search path, too. Try export
>>> PKG_CONFIG_PATH="c:\GTK\Glib\lib\pkgconfig:C:\Program
>>> Files\plplot\lib\pkgconfig". Not sure about the backslashes, though.

Essentially, PKG_CONFIG_PATH must point both to the location where
plplotd-f77.pc and plplotd.pc exist (unless you are in that directory
already) _as well as_ the location where glib-2.0.pc exists.  On the Linux
side, those two locations are separated by a colon, but according to
the pkg-config man page, the separator is a semicolon on Windows.

It appears you attempted to find glib-2.0.pc by

PKG_CONFIG_PATH=C:/GTK/Glib/bin

but clearly glib-2.0.pc doesn't exist in that directory so you should use
the correct locations of that file and also the plplotd*.pc files.  My
guess for this would be

PKG_CONFIG_PATH=C:/GTK/Glib/pkgconfig;C:/plplot/lib/pkgconfig

(note the semicolon separator).  If these are the correct locations
for glib-2.0.pc and plplotd*.pc files, but you still get errors,
then I would try some additional variations (such as colon separator and/or
backslash directory separator).  Also, check the pkg-config man
page (e.g., http://linux.die.net/man/1/pkg-config).  There are some
Windows-specific options in there which might be of help to you.

I think most of us here are guessing because of lack of experience with
pkg-config and the Windows platform, but I hope we have given you some ideas
for a number of experiments and also a good reference (the man page) that
hopefully will lead you to the right answer.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the pkg-config mailing list