[Gtk-sharp-list] gtk-sharp 2.12 windows binary

Christian Hoff christian_hoff at gmx.net
Sun Apr 27 06:22:23 EDT 2008


I already managed to compile Gtk# 2.12 on a cygwin build environment, 
but for some reason my compiled Gtk# dlls do not work(as for as I can 
remember I always got a segfault in Gtk+ when trying to create a new 
Gtk.Window in a demo app that occured when g_object_ref_sink was 
called). Becuase I need new features introduced in the 2.12 
version(GInterface support for custom the models) my application is 
currently only running on Linux.

However I may be able to give you some hints on how I made it to compile 
the dlls:

In my opinion the best way to compile Gtk# is with an installed Mono 
environment for windows(download the Mono installer with Gtk# 2.10). For 
an overview on how to compile the dlls use instructions here: 

But the tutorial is quite outdated and needs to be refreshed(maybe 
someone of the list has write access to the Mono documentation? And why 
cannot everyone contribute to the docu???) and I spent a whole weekend 
until I got the dlls compiled. I followed the Gtk# build instructions 
with the following changes:

- I did NOT download anything of .net or the .NET SDK to the path and 
did not even need to download anything of MS .NET. If you want to use 
.net to build the binaries, you'd better forget it(csc compiler always 
complains about invalid characters in one of its parameters and you have 
the problem with Mono.Cairo(but you may be able to install cairo into 
the .net GAC)

- Also I didn't include any of the Mono directories in the PATH. Instead 
I set up environment variables like GACUTIL="\"/cygdrive/c/program 
\"C:\Programme\Mono-1.9\lib\mono\1.0\gacutil.exe\"" to make sure these 
utils are running under mono(and not under .net which will lead to 
errors). DO NOT ADD the bin directory in the mono root directory to the 
path as the configure script will then use the old Gtk# 2.10 
installation in the bin path

- download the Gtk+ 2.12 bundle from www.gtk.org instead of using the 
download links to old versions in the tutorial

If someone could help me with the Gtk+ g_object_ref_sink error I would 
also volunteer to create working Gtk# 2.12 assemblies; I really do not 
have any idea where I made an error or where this g_object error came 
from so I gave up on it.

But another thing is much more important: to update this tutorial at the 
mono website. If someone with write access to the Mono docu would update 
it(I can write a new version myself) it would be a big step forward.

Christian Hoff

More information about the Gtk-sharp-list mailing list