Web lists-archives.com

Re: [Mingw-users] Help with perl + pkg-config + msys2




-----Original Message----- 
From: RAPPAZ Francois
Sent: Thursday, June 16, 2016 11:26 PM
To: mingw-users@xxxxxxxxxxxxxxxxxxxxx
Subject: [Mingw-users] Help with perl + pkg-config + msys2

> Hi there
>
> Since straweberry perl and msys2 are based on mingw, I tried to post my 
> question here. Sorry if I'm off topic.

I think it probably *is* OT here.
That doesn't bother me, but you could try the Strawberry Perl mailing list 
if it bothers others (or you).

> I get a lot of error with undefined reference when compiling and I see 
> that the pc files in C:\msys64\mingw32\lib\pkgconfig all have 
> prefix=/mingw32 instead of the full path C:/msys64/mingw32
> therefore the Libs and Cflags defined in these files miss the beginning of 
> the path ?

In the Gtk+ pc files that I have, Cflags is used only to specify the 
location of the header files.
If you're getting undefined references then this would indicate that the 
header files are being found ok anyway, and it's only the library files that 
are not being located.

Does it help if you set the LIBRARY_PATH environment variable to the 
location of the Libs:

set LIBRARY_PATH=C:\msys64\mingw32\lib

Also my Gtk+ pc files specify a non-existent location, but that hasn't 
stopped me from building the perl Gtk2 modules.
For example, my cairo.pc looks like:

##############################################
prefix=/devel/target/1315da81bb4f4a54ee1f3f8d6181abe2
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: cairo
Description: Multi-platform 2D graphics library
Version: 1.10.2

Requires.private:  gobject-2.0 glib-2.0       fontconfig >= 2.2.95 freetype2 
 >= 9.7.3  libpng
Libs: -L${libdir} -lcairo
Libs.private:        -lz -lz
Cflags: -I${includedir}/cairo
##############################################

But the "prefix" directory is non-existent on my machine.

Oh ... one more thing (and it might be important) is that with windows perl 
'-lfoo' will (I think) enable linking to libfoo.a, but *not* to 
libfoo.dll.a.
In my Gtk+ installation I have therefore copied every *.dll.a file to *.a 
file (eg my lib folder contains both libcairo.dll.a and an identical 
libcairo.a - the latter having been created solely for the benefit of perl.)

See if any of that helps.

Cheers,
Rob



 


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe