单声道/ Ubuntu的 - 冲突的定义 [英] Mono / Ubuntu - Conflicting definitions

查看:216
本文介绍了单声道/ Ubuntu的 - 冲突的定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一个在Ubuntu库(Medsphere.Widgets),并且它抛出我的错误。我有一个很好的搜索左右,但似乎没有人有这一个答案。配置脚本工作正常,并完成,没有警告或错误。当我去运行make,它这样做:

I'm attempting to build a library (Medsphere.Widgets) on Ubuntu, and it's throwing me an error. I've had a good search around, but nobody seems to have an answer for it. The configure script works fine, and completes with no warnings or errors. When I go to run the make, it does this:

polynomial@ubuntu:~/Projects/Medsphere/$ make
Making all in src
make[1]: Entering directory `/home/polynomial/Projects/Medsphere/src'
/usr/bin/mcs /target:library /out:Medsphere.Widgets.dll -r:/usr/lib/pkgconfig/../../lib/cli/pango-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/atk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gdk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/glib-sharp-2.0/glib-sharp.dll   -r:/usr/lib/mono/2.0/Mono.Cairo.dll    ./CPaned.cs ./FBox.cs ./GridView.cs ./CairoHelper.cs ./IconLayout.cs ./ICairoCellRenderer.cs ./BoxCellRenderer.cs ./PixbufCellRenderer.cs ./TextCellRenderer.cs ./graph/AxisLocation.cs ./graph/AxisSizeGroup.cs ./graph/BaseTreeModelPlot.cs ./graph/DateTimeAxis.cs ./graph/EventPlot.cs ./graph/Graph2D.cs ./graph/Graph.cs ./graph/GtkStyleProvider.cs ./graph/HistogramPlot.cs ./graph/IAxis.cs ./graph/IPlot.cs ./graph/IStyleProvider.cs ./graph/ITreeModelPlot.cs ./graph/LabelAxis.cs ./graph/Legend.cs ./graph/LinearAxis.cs ./graph/LinePlot.cs ./graph/LinkedLinePlot.cs ./graph/PlotColor.cs ./graph/PointShape.cs ./graph/ReferenceRangePlot.cs
./IconLayout.cs(414,25): error CS0029: Cannot implicitly convert type `Cairo.Context' to `Cairo.Context'
./IconLayout.cs(414,25): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
Internal(1,1): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
./IconLayout.cs(920,41): error CS1502: The best overloaded method match for `Gdk.CairoHelper.SetSourceColor(Cairo.Context, Gdk.Color)' has some invalid arguments
/usr/lib/cli/gdk-sharp-2.0/gdk-sharp.dll (Location of the symbol related to previous error)
./IconLayout.cs(920,41): error CS1503: Argument `#1' cannot convert `Cairo.Context' expression to type `Cairo.Context'
./IconLayout.cs(920,41): (equally named types possibly from different assemblies in previous error)
/usr/lib/mono/gac/Mono.Cairo/2.0.0.0__0738eb9f132ed756/Mono.Cairo.dll (Location of the symbol related to previous error)
/usr/lib/mono/gac/Mono.Cairo/1.0.5000.0__0738eb9f132ed756/Mono.Cairo.dll (Location of the symbol related to previous error)
Compilation failed: 3 error(s), 0 warnings

我只能想象这两个版本开罗是相互矛盾的,但我不知道如何解决它。任何想法?

I can only imagine that two versions of Cairo are conflicting, but I can't figure out how to fix it. Any ideas?

推荐答案

只是为了澄清这一个:

我修改的config.status使用的GMC 而不仅仅是 MCS 和修补所有的的Mono.Cairo 引用,使它们指向的特定版本的DLL,而不是一般的人在GAC。修补了几个投在错误的lib后,它的伟大工程!

I modified config.status to use gmcs rather than just mcs and patched all Mono.Cairo references so that they point at the version-specific DLL, rather than the generic one in the GAC. After patching a couple of cast bugs in the lib, it works great!

这篇关于单声道/ Ubuntu的 - 冲突的定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆