Monodevelop gtk-sharp 3.0

10,551

Solution 1

since I'm trying to get gstreamer-sharp 0.99 to run with my application, I heard, that gtk-3 is needed for gstreamer.

gstreamer-sharp 0.99 doesn't depend on gtk-sharp 3, it depends on glib-sharp 3, which, as of today, is hosted in the same repo as gtk-sharp 3, but that will change soonish.

Has anybody tried to build gtk-sharp 3.0 for monodevelop?

MonoDevelop only works with gtk+ 2.x versions. If you install gtk-sharp 3, you will not break or override gtk-sharp 2.x, as they can be installed in parallel.

I'm running fedora and tried, but all I could do, is link the dll manually to my project and the application didn't start.

Tried...? And what...? What happened? I'm assuming you failed? How did you fail, what error did you get?

Is gtk-sharp still beta?

gtk# 3 yes, gtk# 2.x is very mature though.

Solution 2

Currently is possible to use gtk-sharp3 in MonoDevelop (at least in Linux). In Linux Mint 17 Quiana is necessary to install gtk-sharp3 package (no need to build) and add (in extension manager, install from file button) to MonoDevelop MonoDevelop GTK#3 Project Template extension.

This requires a MonoDevelop version >= 5 (see extension addin.xml file) - based on Xamarin packages (again, in my system). Installation guide for debian based systems.

GUI must be edited in an external program, Glade (a glade package) - see Gtk#3 project template descriprion.

Maybe required step is use the latest Mono release (see this) and probably required step is install Gtk3 first (libgtk-3-dev package and his dependencies). I have installed Gtk2 and Gtk3 as well as gtk-sharp2 and gtk-sharp3 simultaneously.

After creating GTK#3.0 project using template is (for my) necessarily add reference to gio-sharp v3.0 and regenerate MainWindow.ui with the use glade!

I hope that's all!

Share:
10,551
Sven
Author by

Sven

Updated on June 04, 2022

Comments

  • Sven
    Sven about 2 years

    since I'm trying to get gstreamer-sharp 0.99 to run with my application, I heard, that gtk-3 is needed for gstreamer. Has anybody tried to build gtk-sharp 3.0 for monodevelop? I'm running fedora and tried, but all I could do, is link the dll manually to my project and the application didn't start. Is gtk-sharp still beta?

    Thanks for your help.

  • Sven
    Sven over 10 years
    I tried and failed, as you said. The compiler crashed with some "MethodNotFoundException". You mentioned that gstreamer-sharp 0.99 depends on glib-sharp3. Are glib-sharp2 and glib-sharp3 paralell installable?!
  • knocte
    knocte over 10 years
    what version of mono are you using? what prefix did you use to install gtk-sharp3? what prefix do you have mono installed? paste the whole mono compiler crash
  • Sven
    Sven over 10 years
    I'm using mono 2.10.8, just went to gtk-sharp-master, entered sh autogen.sh and make and linked the dlls manually to my project.
  • knocte
    knocte over 10 years
    cool, then please reply to my comment that says "Tried...? And what...? What happened? I'm assuming you failed? How did you fail, what error did you get?" , because "didn't start is not enough information", please paste the error you got
  • Sven
    Sven over 10 years
    Well, the compiler crashed and so I couldn't start the program. To shorten the discussion, is gtk#3 needed for glib3? I wouldn't want to move, if it is not needed for gstreamer-sharp-0.99.
  • knocte
    knocte over 10 years
    gtk-sharp 3.x depends on glib-sharp 3.x, but not the other way around. But the thing is, glib-sharp 3.x lives in the same repository as gtk-sharp 3 (github.com/mono/gtk-sharp), although this will change soon, so you need to compile everything in order to get glib-sharp3 (you won't need to do this once it is packaged by your favorite distro)
  • Sven
    Sven over 10 years
    Ok, thanks for you help. I could build gtk-sharp 3.x on my system, but I can't find the binding to enter in monodevelop?! How do I check, if gtk-sharp-3 runs on my system? Also I think, I killed gtk-sharp-2.12 by installing gtk-sharp-3 since I can't get the project to run, the runtime crashes with "Could not load type 'GLib.IgnoreClassInitializersAttribute' from assembly 'gtk-sharp'."
  • Sven
    Sven over 10 years
    Are gtk-sharp2 and gtk-sharp3 installable paralell?
  • knocte
    knocte over 10 years
    yes, I already said yes in my answer, did you read it at all?
  • Sven
    Sven about 10 years
    Ok, thanks for your help. So I'm the only one getting this exception? Seems like a problem in loading glib from gtk-sharp :(.
  • Sven
    Sven about 10 years
    OK, I came so far to say, that gtk-sharp3 is currently not supported by monodevelop. The GUI Designer (stetic) doesn't support gtk-sharp3, which is a pitty for me :(. I read about doing GUI Design in Glade and use monodevelop just to compile, but couldn't get this going. I hope some people make gtk-sharp3 usable for the community.
  • Aaron Franke
    Aaron Franke over 5 years
    It doesn't work in MonoDevelop 7.5, it complains that it requires 5.0.
  • user1209216
    user1209216 almost 5 years
    After 5 years, nothing changed. No gtk# 3 in MonoDevelop and probably never be