On 7/17/2012 at 3:51 AM, YangXi <jiandingzhe msn com> wrote:
Hi, everyone! I use strawberry perl which contains mingw. I also downloaded gtk+-bundle-XXXXX.zip from Gtk website, uncompress it, and added its "bin" directory to Path. While compiling the perl Pango module via "cpan -if Pango", it got the following linking error message: [ LD blib\arch\auto\Pango\Pango.dll ]xs/PangoCairo.o:PangoCairo.c:(.text+0x5b7): undefined reference to `cairo_reference'xs/PangoCairo.o:PangoCairo.c:(.text+0x9a5): undefined reference to `cairo_font_options_copy'xs/PangoCairo.o:PangoCairo.c:(.text+0x1722): undefined reference to `cairo_scaled_font_reference'collect2: ld returned 1 exit status These functions are from cairo, so I modified pangocairo.pc: Libs: -L${libdir} -lpangocairo-1.0 -lcairo and compiled again, but the error still occur. The pkg-config seems working well:pkg-config --libs pangocairo-LD:/Gtk-2.0/lib -lpangocairo-1.0 -lpango-1.0 -lcairo-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl Thanks!!!
The problem is perl-Cairo's import library interfere with Cairo's (the way MakeMaker handles them). Copy attached to the directory that contains the gtk+-bundle, and rebuild Cairo, then try building Pango again. Regards, Martin Vrywaringsklousule / Disclaimer: http://www.nwu.ac.za/it/gov-man/disclaimer.html
Attachment:
fix-cairo-libs-for-perl.pl
Description: Binary data