in reply to Re^4: RFC: Setting up a minGW compiling envronment for Perl 5.10
in thread RFC: Setting up a minGW compiling envronment for Perl 5.10
Here's how I finally got Gtk2-1.164 to build:
1) During the building of the Glib module, a file named Glib.def is created. Using Visual Studio's lib utility create, from Glib.def, an import lib named Glib.a as follows:
3) Copy Glib.a to
4) In the top level Gtk2 source folder run perl Makefile.PL
5) Open the generated Makefile and, to the EXTRALIBS and LDLOADLIBS entries (in the MakeMaker const_loadlibs section), append:
There are probably other ways to get the job done - perhaps some of those ways are better than the method I used. This was just the first way I found of getting the job done.
Cheers,
Rob
1) During the building of the Glib module, a file named Glib.def is created. Using Visual Studio's lib utility create, from Glib.def, an import lib named Glib.a as follows:
With MinGW, the same can be achieved with:lib /OUT:Glib.a /DEF:Glib.def
Update: I made a mistake here. The command needs to be:dlltool --input-def Glib.def --output-lib Glib.a
2) Repeat step 1 for the Cairo module.dlltool --input-def Glib.def --output-lib Glib.a --dllname Glib.dll
3) Copy Glib.a to
and copy Cairo.a toC:/strawberry/perl/site/lib/auto/Glib
(I'm assuming a Strawberry Perl directory structure - modify accordingly.)C:/strawberry/perl/site/lib/auto/Cairo
4) In the top level Gtk2 source folder run perl Makefile.PL
5) Open the generated Makefile and, to the EXTRALIBS and LDLOADLIBS entries (in the MakeMaker const_loadlibs section), append:
6)Run dmake test. Gtk2 should compile, though some of the tests fail (including some segfaults).Here is the test summary that I got:C:\strawberry\perl\site\lib\auto\Glib\Glib.a C:\strawberry\perl\site\ +lib\auto\Cairo\Cairo.a
Step 3 is probably unnecessary - in which case one, obviously, has to change the string that's appended to EXTRALIBS and LDLOADLIBS in the Makefile in step 5.Failed Test Stat Wstat Total Fail List of Failed ---------------------------------------------------------------------- +--------- t/Gdk.t 4 1024 17 12 12-17 t/GdkDisplay.t 255 65280 24 47 1-24 t/GdkPixbuf.t 2 512 101 2 93 96 t/GdkProperty.t 255 65280 46 70 12-46 t/GdkSelection.t 255 65280 20 0 ?? t/GdkVisual.t 255 65280 24 32 9-24 t/GdkWindow.t 2 512 40 2 7-8 t/GtkFontSelection.t 1 256 9 1 8 t/GtkIconTheme.t 1 256 16 1 4 t/GtkIconView.t 5 1280 61 12 56-61 t/GtkImage.t 2 512 45 2 24 34 t/GtkScaleButton.t 5 1280 5 8 2-5 t/GtkStatusIcon.t 1 256 22 1 6 t/GtkTextView.t 1 256 45 1 44 t/GtkTreeSelection.t 255 65280 29 50 4-29 t/GtkTreeView.t 1 256 160 1 156 t/PangoCairo.t 255 65280 22 38 3-22 3 tests and 106 subtests skipped. Failed 17/206 test scripts. 148/4309 subtests failed. Files=206, Tests=4309, 86 wallclock secs ( 0.00 cusr + 0.00 csys = 0 +.00 CPU) Failed 17/206 test programs. 148/4309 subtests failed.
There are probably other ways to get the job done - perhaps some of those ways are better than the method I used. This was just the first way I found of getting the job done.
Cheers,
Rob
In Section
Meditations