Re: [gtkmm] [patch] Building under Cygwin

On Thu, 2004-03-18 at 15:27, Roger Leigh wrote:
> Cedric Gustin <cedric gustin swing be> writes:
> > At 12:58 PM 3/18/2004, Roger Leigh wrote:
> >>Attached is a patch to allow Gtkmm to built in a Cygwin environment.
> >>The patch isn't intended to be applied "as-is", since some things are
> >>broken.
> >>
> >>On the whole, the source assumes that:
> >>- A UNIX environment is using the X11 backend
> >>- Win32 means MinGW
> >>- but Cygwin behaves like a UNIX environment, while requiring
> >>   -no-undefined as a linker option, and may optionally use the win32 GDK
> >>   backend rather than X11.
> >
> > Could you please create a bugzilla entry for this ?
> Sure, it's #137591.

Ok, I'll have a look.

> Some folks on the list (and gtk-list, IIRC) were wanting to build on
> Cygwin.  I've now got to the stage of successfully building natively
> all the latest stable releases (as of a week ago) glib, atk, pango,
> gtk/gdk and libglade (and libglademm).  I'll post these to the
> gtk-list and gtkmm-list in a few days once I've cleaned them up.  I'll
> also file bugs (or should first port them to the latest stable (GTK+
> 2.4.0 etc.) releases--will there be another 2.2 release?).

I want to make sure we are talking about the same thing when you use the
term 'natively' : did you build glib, atk, pango and gtk using
cygwin-gcc with or without the -mno-cygwin compiler option ? Compiling
natively usually means 'that uses the msvcrt DLL' (with either the
mingw32-gcc, or cygwin-gcc with the -mno-cygwin option), as opposed to
the cygwin POSIX layer (the cygwin.dll). 

And if you built against the cygwin DLL (POSIX layer), do you have a
working version of gtk+ for both the x11 and win32 backends (as returned
by 'pkg-config --variable=target gtk+-2.0') ?

The situation is actually quite complex here. You can build gtk+ (hence

1. with mingw32-gcc : you get the native win32 port (as provided by Tor
Lillqvist or in the dropline installer) that uses the MSVCRT dll. My
gtkmm binaries are a native win32 port of gtkmm 
2. with cygwin-gcc using the -mno-cygwin option : you also get a native
win32 port, which should be compatible with mingw32-gcc. I tested this
configuration this week with the recently released gtk+-2.4.0 and the
latest CVS gtkmm, and it works fine (passing the --host=i386-pc-mingw32
option to configure)
3. with cygwin-gcc without the -mno-cygwin option (or explicitly with
-mcygwin): You get binaries that use the cygwin POSIX layer (the cygwin
dll). You have the choice of 2 backends
	a. The x11 backend (the --with-gdktarget=x11 configure option for gtk+)
	b. The win32 backend (--with-gdktarget=win32)

Currently, gtkmm (2.2 and 2.3) builds fine (out of the box) in the 1 and
2 cases. Could you please confirm that you're interested in case 3 ? 


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