Re: Linking problem when compiling under MinGW



On Wed, 2006-10-04 at 17:36 +0300, Ari Jolma wrote:

I'm building Gtk2 under MinGW.

Glib and Cairo compiled ok, the tests did  not do so well, but anyway.

With Gtk2 I'm stuck with an "undefined reference to" problem: the last
$(INST_DYNAMIC) step seems to miss references to Glib.dll and Cairo.dll.

If I add Glib.dll with a full path (c:/perl/site/lib/auto/Glib/) before
the last token (dll.exp) into the link commands, I get rid of all
undefined references to functions in Glib.dll. But it leaves undefined
references, e.g. to cairo_object_from_sv, which are in Cairo.dll. But
having both Glib.dll _and_ Cairo.dll in the link command does not seem
to help, g++ does not seem to see Cairo.dll.

First of all, you'll need Cairo >= 1.00, which is the version that first
started properly exporting its symbols.  Then you'll somehow need to
convince your linker to accept both Glib.dll and Cairo.dll; both are
needed.  There's a hack for Win32 at the end of Gtk2's Makefile.PL,
maybe it can be adapted for MinGW.

-- 
Bye,
-Torsten




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