[Gtk-sharp-list] Can't choose C# GTK# Project on Mac 10.5.6

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Mar 18 01:02:40 EDT 2009

On Tue, Mar 17, 2009 at 4:37 AM, PattiMan <PattiMan at gmail.com> wrote:
> I'm using MonoDevelop 1.9.1 (2.0 alpha 2) and installed MonoFramwork 2.2_5
> framework. After starting up Mono I want to create a new C# (or C++) GTK#
> project, but it's not available. Strange thing is that a GTK# project is
> available for VB.

Yup, the thing is that the GTK# project templates are included in the
GTK# designer addin, which doesn't currently work on the Mac, since
the Mac GTK+ port is relatively immature and is missing features we
need for the designer. The designer doesn't support VB yet, so the VB
GTK# templates are in the VB addin.

> If I look at the additional addins (in the Add-in Manager) I see four
> versions of GTK# (2.4, 2.6, 2.8 and 2.10) but if I select any of them I get
> a message saying that GTK Core 1.9.1 is missing.
> After performing "pkg-config --modversion gtk-sharp-2.0" I get 2.12.7. My
> PKG_CONFIG_PATH is set to
> "/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig"
> Can anybody help me with this? I already wasted 3 days trying to solve this
> problem :-(

There's a problem with the Mac Mono/MD installer, in that it doesn't
set the PKG_CONFIG_PATH to include the Mono framework pc files (MD
doesn't actually use pkg-config, it just tries to look in the right
places and parse the .pc files). That said, if you've set the path
yourself, it should be working.

After MD 2.0 beta 1, I improved MD's pkg-config detection, so it
correctly picks up GTK# (and other Mono libraries) and offers them in
the edit references dialog.

> Thanks in advance!
> PS I tried building Mono 1.9.3 (2.0 beta 2.0) but it gives me an error: "You
> need to install update-desktop-database", so I can't tell if that release
> solves my problem...

To build for Mac, you have to pass some extra flags. The Mac profile does this:

Alternatively, I built a MD Mac app (on linux) from the 2.0 branch a
few hours ago, for testing. You're welcome to try it:

MD's actually capable of building itself on Mac now, without any
makefiles or autotools. Just use the DebugMac configuration, which
will exclude the addins that don't work or aren't needed on Mac.

Michael Hutchinson

More information about the Gtk-sharp-list mailing list