After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 133072 - gtkmm-2.3 should build on win32
gtkmm-2.3 should build on win32
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: build
2.4
Other Windows
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-01-31 16:15 UTC by Cedric Gustin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes compilation of gtkmm-2.3 on win32 (mingw) (50.65 KB, patch)
2004-01-31 16:47 UTC, Cedric Gustin
none Details | Review
The revamped Makefile_build_gensrc.am_fragment (2.70 KB, text/plain)
2004-01-31 16:47 UTC, Cedric Gustin
  Details
The new folder chooser from gtkmm on win32 (27.70 KB, image/jpeg)
2004-02-29 21:03 UTC, Cedric Gustin
  Details
Patch that fixes compilation of gtkmm-2.3 on win32 (mingw) (28.58 KB, patch)
2004-03-09 11:04 UTC, Cedric Gustin
none Details | Review

Description Cedric Gustin 2004-01-31 16:15:21 UTC
We have to make sure that the 2.3 development tree of gtkmm (to become 
gtkmm-2.4) builds on win32 using free tools (mingw32-gcc) and/or the de-
facto standard compiler (MSVC.NET).
Comment 1 Cedric Gustin 2004-01-31 16:46:02 UTC
Following my patch for glibmm-2.3, I successfully compiled gtkmm-2.3 
(cvs) against gtk+-2.3.2 using mingw32-gcc (3.2.3). The worst part 
was definitively building gtk+-2.3.2 as no official binaries are 
currently provided. As gtk+-2.3 is rapidly changing when heading 
towards 2.4, my goal here is not to give a detailed description of 
the steps I followed but instead to submit a patch that makes the 
build of gtkmm possible with mingw32 as of today. 

As for gtkmm-2.2, a non-negligeable number of methods have been 
disabled on win32 because they are currently not available (dll 
exported) in gtk+-2.3. README.win32 has been updated to reflect the 
current status.

The biggest changes I made take place in the build_shared directory. 
The building process is getting quite complicated because it involves 
generated files (.h and .cc files coming from their .hg and .ccg 
counterparts in sublib/src) and extra files (.h and .cc source files 
located in sublib/sublibmm). All those files can either be platform-
independent (general) or platform-specific (win32/posix). And there 
is now the "deprecated" category !

To make this work and install correctly on win32, I had to introduce 
new variables in Makefile_build_gensrc.am_fragment. This file is now 
an interface between the sublib-specific list of files defined in the 
Makefile_list_of_hg.am_fragment's and the generic 
Makefile_build.am_fragment and Makefile_gensrc.am_fragment, to be 
included in sublib/src/Makefile.am and sublib/sublibmm/Makefile.am, 
respectively (where sublib can be atk, pango, gdk, gtkmm, ...). I 
added a lengthly description of these new variables introduced in 
Makefile_build_gensrc.am_fragment. I'm aware that these are not small 
changes but I think this adds some more genericity to the all 
building process.

I attached my patch against the current CVS along with the revamped 
Makefile_build_gensrc.am_fragment for people who want to have a look. 
See the patched ChangeLog for details.
Comment 2 Cedric Gustin 2004-01-31 16:47:10 UTC
Created attachment 23924 [details] [review]
Patch that fixes compilation of gtkmm-2.3 on win32 (mingw)
Comment 3 Cedric Gustin 2004-01-31 16:47:49 UTC
Created attachment 23925 [details]
The revamped Makefile_build_gensrc.am_fragment
Comment 4 Murray Cumming 2004-02-10 14:59:27 UTC
> As gtk+-2.3 is rapidly changing when heading towards 2.4.

The API is not, I think, so it should not be a problem.

> non-negligeable number of methods have been 
> disabled on win32 because they are currently not available (dll 
> exported) in gtk+-2.3

I hope that that is being dealt with elsewhere, like before.

I trust you with the build changes, based on your previous stuff. I
know that it's getting complicated - and I don't think the deprecated
variables are even used yet. We'll make it better later if we think of
a way.

Please feel free to commit this. Thanks for the great work and the
explanation.
Comment 5 Cedric Gustin 2004-02-16 19:59:37 UTC
I will commit this as soon as I have a successful build of the latest 
glibmm and gtkmm against libsigc++2. Right now, I have this GdkColor 
const correctness error that was just reported by Alberto Paro on the 
mailinglist. Apart from that, compilation is running fine, so I hope 
we can have a simultaneous release of gtkmm-2.4 on both (l)unix and 
win32 (if a stable win32 port of gtk+-2.4.0 is immediately available).
Comment 6 Cedric Gustin 2004-02-25 07:00:52 UTC
glib-2.3.3 and gtk+-2.3.4 were released today but the future does not 
look good for the port of gtk+ on the win32 platform. glib does not 
compile at all on win32 as a bunch of posix-related functions were 
recently added, without providing win32 replacements. 

I also found this bug report

http://bugzilla.gnome.org/show_bug.cgi?id=134813

which is not promising.

I guess I'll wait till the next unstable release and see if the 
situation somewhat improves before submitting my patches for glibmm 
and gtkmm. 
Comment 7 Murray Cumming 2004-02-26 23:58:18 UTC
> Right now, I have this GdkColor const correctness error that was
just > reported by Alberto Paro on the mailinglist.

In general, you need GTK+ from CVS to build gtkmm from cvs, during the
unstable phase.

> the future does not look good for the port of gtk+ on the win32 
> platform. glib does not compile at all on win32 as a bunch of 
> posix-related functions were recently added, without providing win32
> replacements. 

Hmm, where are the emails/bugs about this?
Comment 8 Cedric Gustin 2004-02-27 07:07:02 UTC
Ok, I tried CVS. glib is now fine, thanks to yesterday commits by Hans
Beuer. See this thread
http://mail.gnome.org/archives/gtk-devel-list/2004-February/msg00190.html
for details, bugzilla ref numbers, ... 

Same thing for pango and atk. Looks good. 
I then successfully compiled CVS glibmm. 

I'm currently fighting with CVS gtk+ (which, as of today, fails
miserably with mingw32-gcc) and I'm closely following the ChangeLog
for commits by either Hans Beuer or Tor, but I don't think Tor has
tried to build gtk+ recently with mingw32-gcc (see bugzilla #134813)
Comment 9 Murray Cumming 2004-02-29 17:49:26 UTC
> I'm currently fighting with CVS gtk+ (which, as of today, fails
> miserably with mingw32-gcc)

It's great that you got this far, but you should not keep any problems
to yourself. Please post to a mailing list about this - maybe someone
knows a solution already or wants to find one. 
Comment 10 Cedric Gustin 2004-02-29 21:01:51 UTC
I managed to compile glib, atk, pango, gdk and gtk from CVS. A few 
fucntions were not DLL exported. I will submit entries on bugzilla in 
the next few days to fix these problems (like I did for gtk+-2.2). 
glibmm and gtkmm compile successfully. The helloworld example runs 
fine. However, I have problems with all examples that call 
show_all_children. No widget is shown and the program exits 
immediatly (without error, return status 0). Changing this to 
show_all somewhat fixes the problem but of course, it removes all 
recursivity !

Any idea ? 

P.S. : I attach a screenshot of the new (wimpified) gtkmm folder 
chooser.
Comment 11 Cedric Gustin 2004-02-29 21:03:16 UTC
Created attachment 24950 [details]
The new folder chooser from gtkmm on win32
Comment 12 Murray Cumming 2004-03-01 00:11:04 UTC
Well done. No idea about the show_all_children() though it's worth
noting that it is a gtkmm method, not a GTK+ method. It's implemented
with C functions but it can also be implemented with the STL-style
children() container. You might try that.
Comment 13 Cedric Gustin 2004-03-02 08:52:30 UTC
The show_all_children bug disappeared when I updated to the latest 
libsigc++ CVS. 

gtkmm cvs HEAD is now compiling fine on win32. All examples seem to 
be functional (including gtk-demo). It also seems that work has 
resumed on the win32 port of gtk+ (see recent posts on the gtk-devel 
list). I'm trying to track win32-related changes on the glib, atk, 
pango and gtk+ CVS. All glib, atk and pango functions are now 
available in their -mm counterparts on win32. Same for gtk+/gtkmm 
(with the usual exceptions of plug and socket) ! A few gdk functions 
are currently not implemented on win32 (mostly related to 
display+cursor) and are not wrapped in gdkmm. I updated the 
README.win32 accordingly.

Before I commit my changes, I need to test the generated tarball 
(make dist) on linux (on my fedora core 1 box). 

I also need some extra info on the build process of deprecated files. 
Currently, generated deprecated files (combo.(h|cc)g for example) are 
compiled and installed while extra deprecated files (like 
toolbar_elements) are neither compiled nor installed. Is that 
supposed to be the correct behavior ?
Comment 14 Cedric Gustin 2004-03-09 11:03:40 UTC
Ok, here is a new (very long) patch to make gtkmm CVS build on win32 
with mingw32 against glib, atk, pango and gtk+ 2.4 HEAD (as of 
20040308). The good news is that it works beautifully, thanks to the 
amazing work of the gtk+-on-win32 developers in the last few days. 
Turns out all gtk+ functions are now available from gtkmm on win32 
(with the exception of Plug and Socket of course !). 

Now, I hope this patch does not break anything on (l)unix. I tested a 
generated tarball on my Fedora box and it seems to work as expected. 
I would be glad if somebody else could patch his own CVS checkout and 
test it with another linux distribution for example. I will then 
commit my changes.

See the patched ChangeLog for details.
Comment 15 Cedric Gustin 2004-03-09 11:04:24 UTC
Created attachment 25382 [details] [review]
Patch that fixes compilation of gtkmm-2.3 on win32 (mingw)
Comment 16 Murray Cumming 2004-03-12 12:03:37 UTC
It seems fine in my checkout. Please commit.
Comment 17 Murray Cumming 2004-03-12 20:38:45 UTC
I committed it accidentally myself.

Closing. Well done and thanks for the hard work.