Notes from building Gtk2-Perl using MinGW/dmake (long)



As promised, here are my notes on building Perl and Gtk2-Perl using
MinGW and dmake on Windows (Windows XP).

Short summary:

1) There were missing functions in the @exports lists for both the
Cairo and Glib Perl modules.  I added the missing functions by hand In
order for them to be visible when it came time to compile Gtk2 (see
the longer notes below for specifics).  I used objdump -p to verify
the .dll's had the correct library functions compiled in before moving
on to the next step.

2) To get Gtk2 to compile, I created 'import library' (*.a) files
during compilation of the Cairo and Glib modules so that when the
linker ran during compilation of Gtk2, it could find the pieces-parts
from the two new libraries (Cairo.dll and Glib.dll) and link them into
the new Gtk2 .dll. More info on 'import libraries':
http://mingw.sourceforge.net/MinGWiki/index.php/CreateImportLibraries

3) I added various import libraries to EXTRALIBS and LDLOADLIBS in the
Makefiles of Cairo, Glib and Gtk2 so that they would compile.

Longer Notes:

Cairo-1.043 - The Makefile.PL is missing 'cairo_font_type_from_sv' and
'cairo_font_type_to_sv' in the @exports list. It should be added prior
to running Makefile.PL so the Cairo.def file gets created correctly.

Here's an error I got when I ran 'perl Makefile.PL'

WARNING: EXTRA_META is not a known parameter.
'EXTRA_META' is not a known MakeMaker parameter name.
Note (probably harmless): No library found for -lcairo

Full paths to the following files added to EXTRALIBS and LDLOADLIBS in
the Makefile: libcairo.dll.a

'dlltool' command used to build the import library:
dlltool --input-def Cairo.def --dllname Cairo.dll \
   --output-lib libCairoPerl.dll.a

Glib-1.162 - The Glib.exports file is missing 'SvGKeyFile' in the
@exports list.  It should be added prior to running Makefile.PL so the
Glib.def file gets created correctly.

Full paths to the following files added to EXTRALIBS and LDLOADLIBS in
the Makefile:  libglib-2.0.dll.a, libgobject-2.0.dll.a,
libgthread-2.0.dll.a

'dlltool' command used to build the import library:
dlltool --input-def Glib.def --dllname Glib.dll \
     --output-lib libGlibPerl.dll.a

Gtk2-1.162 - Full paths to the following files added to EXTRALIBS and
LDLOADLIBS in the Makefile: libgtk-win32-2.0.dll.a
libgdk-win32-2.0.dll.a libatk-1.0.dll.a libgdk_pixbuf-2.0.dll.a
libpangowin32-1.0.dll.a libpangocairo-1.0.dll.a libpango-1.0.dll.a
libcairo.dll.a libgobject-2.0.dll.a libgmodule-2.0.dll.a
libglib-2.0.dll.a libgthread-2.0.dll.a libCairoPerl.dll.a
libGlibPerl.dll.a

Gtk2 should now compile without errors.

I think that's everything.  Please let me know if you have any questions.

Thanks,

Brian

-- 
"(Rock and roll is) a rebellion against the Puritan ethic which was
decreed from the beginning of our society that Americans are not
allowed to have pleasure" -- Alan Lomax, 1959



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]