I'm on Kubuntu 10.04 and I just installed every posible package named mono. I started a new GTK project (on monodevelop) and when I try to build the solution provided by the wizzard it tells me that the namespace gtk couldn't be found, that I may be missing a "using" statement.
Does anybody knows what am I doing wrong besides using linux and expecting things to work properly by default?
/rant
[Edited by - owl on December 1, 2010 8:32:26 PM]
Monodevelop doesn't work out from the box... (actually it does)
Quote:Original post by outRiderMonoDevelop itself depends on gtk-sharp2, so he must already have that.
gtk-sharp2.
Quote:Original post by owlNot to put too fine a point on it, but you do have a using Gtk; line at the top of your sourcefile, right?
it tells me that the namespace gtk couldn't be found, that I may be missing a "using" statement.
Quote:Original post by swiftcoderQuote:Original post by outRiderMonoDevelop itself depends on gtk-sharp2, so he must already have that.
gtk-sharp2.Quote:Original post by owlNot to put too fine a point on it, but you do have a using Gtk; line at the top of your sourcefile, right?
it tells me that the namespace gtk couldn't be found, that I may be missing a "using" statement.
I just ran the gtk wizard without adding or removing anything from the source code that gets generated...
I think I found a possible solution.
Quote:All that is needed is to install the gtk-sharp-devel RPM to match your gtk-sharp package and Monodevelop will include all of the GTK# related packages in its package list. If you're lucky then it may even correctly select the gtk-sharp and gdk-sharp packages for you!
Quote:Original post by owlThat is talking about a yum-based package manager. There don't appear to be a separate dev package for gtk-sharp2 in apt.
I think I found a possible solution.
Quote:Original post by swiftcoderQuote:Original post by owlThat is talking about a yum-based package manager. There don't appear to be a separate dev package for gtk-sharp2 in apt.
I think I found a possible solution.
Ok. I just installed it at home and I'm getting the same resutlts. The wizard generates this code:
using System;using Gtk;public partial class MainWindow : Gtk.Window{ public MainWindow () : base(Gtk.WindowType.Toplevel) { Build (); } protected void OnDeleteEvent (object sender, DeleteEventArgs a) { Application.Quit (); a.RetVal = true; }}
I'm getting 6 warnings:
Warning: The reference 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' is not valid for the target framework of the project. (test)---Warning: The reference 'gdk-sharp, Version=2.12.0.0, (...idem)Warning: The reference 'glib-sharp, Version=2.12.0.0 (...idem)Warning: The reference 'glade-sharp, Version=2.12.0.0 (...idem)Warning: The reference 'pango-sharp, Version=2.12.0.0 (...idem)Warning: The reference 'atk-sharp, Version=2.12.0.0 (...idem)
And an error at line 2 (using Gtk;)
/Projects/test/test/MainWindow.cs(7,7): Error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (test)
Quote:Original post by swiftcoderQuote:Original post by outRiderMonoDevelop itself depends on gtk-sharp2, so he must already have that.
gtk-sharp2.
I installed gtk-sharp2 and it works now. Apparently I didn't restart monodevelop after installing it and that's why it didn't worked.
Thank you everyone.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement