【问题标题】:Fail to build Mono.Addins with the latest Mono 4.3.0 and GTK# on Ubuntu 14.04无法在 Ubuntu 14.04 上使用最新的 Mono 4.3.0 和 GTK# 构建 Mono.Addins
【发布时间】:2015-06-11 19:20:09
【问题描述】:

尝试使用最新的 Mono 构建最新的 Monodevelop。我已经成功安装了 Mono 4.3.0 和 GTK#。正如我所看到的,Monodevelop 需要安装 Mono.Addins,但是当我尝试安装最新的 Mono.Addins 时,它会失败并出现下一个错误:

Mono.Addins.Gui/AddinManagerDialog.cs(189,24): error CS0506: `Mono.Addins.Gui.AddinManagerDialog.Dispose()': cannot override inherited member `GLib.Object.Dispose()' because it is not marked virtual, abstract or override
Mono.Addins.Gui/AddinTreeWidget.cs(52,25): error CS0012: The type `GLib.IIcon' is defined in an assembly that is not referenced. Consider adding a reference to assembly `gio-sharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'
Mono.Addins.Gui/ManageSitesDialog.cs(67,24): error CS0506: `Mono.Addins.Gui.ManageSitesDialog.Dispose()': cannot override inherited member `GLib.Object.Dispose()' because it is not marked virtual, abstract or override
Mono.Addins.Gui/NewSiteDialog.cs(46,24): error CS0506: `Mono.Addins.Gui.NewSiteDialog.Dispose()': cannot override inherited member `GLib.Object.Dispose()' because it is not marked virtual, abstract or override
gtk-gui/generated.cs(65,52): error CS0234: The type or namespace name `SizeRequestedArgs' does not exist in the namespace `Gtk'. Are you missing an assembly reference?
Mono.Addins.Gui/HeaderBox.cs(98,27): error CS0115: `Mono.Addins.Gui.HeaderBox.OnSizeRequested(ref Gtk.Requisition)' is marked as an override but no suitable method found to override
Mono.Addins.Gui/HeaderBox.cs(125,27): error CS0115: `Mono.Addins.Gui.HeaderBox.OnExposeEvent(Gdk.EventExpose)' is marked as an override but no suitable method found to override
Mono.Addins.Gui/HoverImageButton.cs(83,44): warning CS0618: `Gtk.Style' is obsolete: `Replaced by StyleContext'
Mono.Addins.Gui/HoverImageButton.cs(150,33): error CS0115: `Mono.Addins.Gui.HoverImageButton.OnExposeEvent(Gdk.EventExpose)' is marked as an override but no suitable method found to override

如何解决?

Ubuntu 版本 - 14.04

【问题讨论】:

    标签: ubuntu mono


    【解决方案1】:

    好的,我找到了解决方案。这很简单。我只是选择了错误版本的 GTK# 库。它应该是2.12.* 版本,但在GTK# master 上它是2.99.*。当我更改版本时(git checkout),一切都按原样编译。

    只有设置了标志--disable-gui--enable-gui-gtk3 时,Mono.Addins 才会使用 GTK# 的2.99.* 进行编译。换句话说,GTK# 2.99.* 只能与 GTK+ 3.0 一起使用,因此 Mono.Addins 应配置为使用此版本的 GTK+。希望这个解释会对某人有所帮助。

    【讨论】:

    • 在哪里可以修改 GTK# 2.12 的 Mono.Addins?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-18
    • 1970-01-01
    • 2017-04-04
    • 2019-03-19
    • 1970-01-01
    • 2014-08-08
    • 1970-01-01
    相关资源
    最近更新 更多