[Gtk-sharp-list] Assembly not found, Compiling Gtk# application

Aristotle obrigman at nc.rr.com
Thu Dec 4 19:27:56 EST 2008

Walter_S wrote:
> I have installed the newest version of Mono and MonoDevelop 1.9.1 (Alpha1)
> on a MAC. The installation seemed to work without problem.
> In the MonoDevelop (MD) I chose the template "Gnome#-2.0-Project" from the
> C# > Example page (which I think is a Gtk# application, right?).
> When I compile it (without adding or editing anything) it produces 4
> errors: 
> Type or namespace name 'Gtk' could not be found....
> Type of namespace name 'Gnome' could not be fount.....
> ...
> Compiling a trivial console application works and the produced EXE also
> runs on Windows. All right. But what about the Gtk etc. assembly? I don't
> think it's a problem of MD, running the gmcs from the terminal produces
> the same errors. Are there any post-installation configurations that must
> be done manually?
> Thanks a lot for any hint.
> Walter

Hi Walter;

Did you include the mono libs in you environment path(s)?
If not, open up a terminal and type these individually

export PATH=/opt/mono/bin:$PATH
export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig
export MONO_PATH=/opt/mono/lib

(Remember to substitute the path where you installed mono!)

Don't know if this applies to MACs but on linux we have a .bashrc file in
our home directory
where we can add these lines.It's just more convenient this way, so look for
a file like this
in you home directory, it's a hidden file!

Also when compiling from command line use : mcs ProgramName.cs
-pkg:gtk-sharp-2.0 -pkg:etc.

Hope this helps!
View this message in context: http://www.nabble.com/Assembly-not-found%2C-Compiling-Gtk--application-tp20750393p20845522.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list