[pkg-config] Glib not found

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Mar 23 10:48:49 PDT 2010

On 2010-03-23 08:47-0700 Dan Nicholson wrote:

> On Tue, Mar 23, 2010 at 8:34 AM, Vincenzo Urso Miano
> <ursomiano at googlemail.com> wrote:
>> Hello
>> I am trying to compile a fortran source file which uses plplot. A
>> graphic library.
>> I type:
>> ________________________________________________________________________________________________
>> cd c:"\Program Files\plplot\share\plplot5.9.5\examples\f77"
>> set PKG_CONFIG_LIBDIR=c:\GTK\Glib\bin;"C:\Program
>> Files\plplot\bin";"C:\Program Files\plplot\lib\pkgconfig";c:"\Program
>> Files\plplot\bin"
>> c:\win-bash\win-bash
>> bash$ gcc -o test x01f.f `pkg-config --libs --cflags plplotd`
>> ______________________________________________________________________________________________
>> c:\GTK\Glib\bin is the path to libglib-2.0-0.dll
>> "C:\Program Files\plplot\bin" is the path to libplplotd.dll
>> C:\Program Files\plplot\lib\pkgconfig is the path to plplotd.pc
>> I get an error because glib is not found glib-2.0-0
> 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.

I have just noticed the embedded blanks in your directory names.  When I
have tried that on Linux it never works with pkg-config (see my previous
post here on that issue).  There are also other parts of the PLplot build
that do not work with embedded blanks.  So my advice is to use a different
install prefix for PLplot that does not have embedded blanks, e.g.,

C:\Program Files ==> C:\Program_Files

Also, for the fortran 77 PLplot bindings you need a different pkg-config
package.  plplotd ==> plplotd-f77.  That will add flags for Fortran 77
to the flags you normally get for plplotd.

To help others here help you further, what are the contents of
plplotd-f77.pc and plplotd.pc files on Windows?  (The CMake-based
PLplot build system configures those files, but it would be good
to see the actual results of that configuration on Windows.)

Also, what are the actual results of running

pkg-config --libs --cflags plplotd-f77


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

Linux-powered Science

More information about the pkg-config mailing list