I am taking my first steps (or perhaps my last steps) in GTK# on Mono for OSX. I write a .cs file and then try to compile with mono:
gmcs -pkg:gtk-sharp-2.0 one.cs
this results in this message
error CS8027: Couldn't run pkg-config: ApplicationName='pkg-config', CommandLine='--libs gtk-sharp-2.0', CurrentDirectory=''
Which would, apparently, require me to know what I'm doing. I do know that
Mono's Installer for MacOS X comes with Gtk+ and Gtk# so you can start building and running cross-platform GUI Gtk# applications that include OSX."
So there's nothing to install.
I do find GTK2 here
/opt/local/var/macports/sources/rsync.macports.org/release/ports/x11/gtk2/
which was definitely installed by the Mono installation.
Gmcs version is 2.4.2.2.
Edit: Miguel says I have something weird in my path.
I have removed all Macports following Macports instructions. I have reinstalled Mono from the .dmg. Here is my current path
export PATH=/opt/subversion:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
but even if use just /usr/bin it's still not avoiding the error.
ALL Mono stuff is where it's supposed to be, including all the stuff in /Library/Frameworks/Mono.framework/Versions/Current
. HOWEVER: strangely
/Library/Frameworks/Mono.framework/Versions/2.4.2.2/lib/gtk-sharp-2.0/
is empty. But MonoDevelop runs, but doesn't know about Gtk (I've included all the references it knows about)...