Re: Link errors building gdk-pixbuf under CygWin



Ian Puleston writes:
 > I'm trying to build the WIN32 version of GTK 2.10.9 (actually just the GDK
 > library) in Windows using CygWin

Are you tring to build a Cygwin version of GTK+ (one that uses the
Cygwin runtime), or a native Win32 GTK+ (that uses just the Microsoft
C runtime and the Win32 system libraries)? 

For the latter, you could be using the -mno-cygwin flag to Cygwin's
gcc, which kinda works, or preferrably a real cross-compilation
environment from Cygwin to Win32.

Cygwin ships a Cygwin version of GTK+ with the X11 backend and all its
dependencies. So presumably you either want to build also a Cygwin
GTK+ but with the win32 (i.e. GDI) backend, or a native Win32 GTK+
(with the win32 backend).

If the latter, I strongly recommend using mingw and MSYS instead of
Cygwin as a development environment. It is way too easy to end up with
a confusing mess if one doesn't really know what one is doing when
using Cygwin. I mean mixing up Cygwin headers and libraries with
non-Cygwin ones.

 > gcc -march=pentium -shared .libs/libgdk_pixbuf-2.0-0.dll.def
 > libs/gdk-pixbuf.o .libs/gdk-pixbuf-animation.o .libs/gdk-pixbuf-data.o
 > libs/gdk-pixbuf-io.o .libs/gdk-pixbuf-loader.o .libs/gdk-pixbuf-scale.o
 > libs/gdk-pixbuf-simple-anim.o .libs/gdk-pixbuf-util.o .libs/gdk-pixdata.o
 > libs/gdk-pixbuf-enum-types.o -Wl,--whole-archive pixops/.libs/libpixops.a
 > -Wl,--no-whole-archive  -L/target/lib -L/usr/lib -Lc:/GTK/lib -lgmodule-2.0
 > -lgobject-2.0 -lglib-2.0 /usr/lib/libiconv.dll.a -ltiff -ljpeg -lpng12
 > /usr/lib/libintl.dll.a  -march=pentium -Wl,gdk_pixbuf-win32-res.o -o
 > libs/libgdk_pixbuf-2.0-0.dll -Wl,--enable-auto-image-base -Xlinker
 > --out-implib -Xlinker .libs/libgdk_pixbuf-2.0.dll.a

I don't see any -mno-cygwin switch, so presumably you want to build
Cygwin binaries then.

What is that /target/lib? That sounds like something I used some time
ago as the prefix in my native Win32 builds of GLib, GTK+ etc. You
shouldn't mix up those with this if you indeed are building Cygwin
binaries.) What is in c:/GTK/lib? That sounds suspiciously like the
default installation location for the gladewin32 distribution of
native Win32 GTK+. You shouldn't mix in that either if you are
building Cygwin binaries.

--tml



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