[pkg-config] Glib not found

Vincenzo Urso Miano ursomiano at googlemail.com
Fri Apr 2 05:01:26 PDT 2010


I solved it. I used
g77 -o test.exe x01f.f -IC:/plplot/include/plplot -LC:/plplot/lib
-lplplotf77optsd -lplplotf77cd -lplplotf77d -lplplotd -lcsirocsa
-lqsastime
Thak you for the support
Vince

2010/4/2 Vincenzo Urso Miano <ursomiano at googlemail.com>:
> @ Alan - Thank you for the detailed post. It was really helpful.
>
> It turns out that I don't have glib-2.0.pc at all. I did not find
> anywhere else that I needed that. That could be the problem. Could you
> tell me how do I get that?
>
> Nevertheless I tried the following:
> -I renamed the example x01f.f  to  a.f
> -Copied in C:\GTK\Glib\bin. I know it looks bad but I wanted to make it simple.
> then i typed the following in cdm
> ----------------------------
> cd C:\GTK\Glib\bin
> set PKG_CONFIG_PATH=C:\plplot\lib\pkgconfig
> win-bash
> bash$ gcc -o test.exe a.f `pkg-config --libs --cflags plplotd-f77`
> ----------------------------
>
> Result:
>
> ----------------------------
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc2gvIO6.o:a.f:(.text+0xe):
> undefined reference to `plparseopts_'
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc2gvIO6.o:a.f:(.text+0x2d):
> undefined reference to `s_wsfe'
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc2gvIO6.o:a.f:(.text+0x49):
> undefined reference to `do_fio'
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc2gvIO6.o:a.f:(.text+0x5c):
> undefined reference to `G77_lnblnk_0'
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc2gvIO6.o:a.f:(.text+0x73):
> undefined reference to `do_fio'
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc2gvIO6.o:a.f:(.text+0x78):
> undefined reference to `e_wsfe'
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc2gvIO6.o:a.f:(.text+0x117):
> undefined reference to `s_stop'
> /mingw/lib/libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `Win
> Main at 16'
> collect2: ld returned 1 exit status
> -----------------------
>
> Pkg-config seems to find glib, now (obviously!!). I don't know what's
> missing. Could you help me?
>
>
> I also typed the following on cmd
> -----------------------
> cd C:\GTK\Glib\bin
> set PKG_CONFIG_PATH=C:\plplot\lib\pkgconfig
> win-bash
> pkg-config --libs --cflags plplotd-f77
> -----------------------
>
> The result looks healthy, now:
> -----------------------
> -IC:/plplot/include/plplot  -LC:/plplot/lib -lplplotf77d -lplplotf77cd
> -lplplotd  -lcsirocsa -lqsastime
> -----------------------
>
> Thanks in advance
> Vince
>
> 2010/3/31 Alan W. Irwin <irwin at beluga.phys.uvic.ca>:
>> 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
>> __________________________
>> _______________________________________________
>> pkg-config mailing list
>> pkg-config at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/pkg-config
>>
>


More information about the pkg-config mailing list