我正在尝试在Mac OS 10.9.1上编译MonoMac 说明很简单,所以我执行它们:
git clone https://github.com/mono/maccore.git
git clone https://github.com/mono/monomac.git
cd monomac
make
不幸的是它失败了:
[...]
MonoDevelop Build Tool
INFO:Found Xcode, version 5.0.2 (3335.32).
INFO:Xamarin.iOS not installed. Can't find mtouch.
Loading solution: /Users/nico/src/monomac/samples/ButtonMadness/ButtonMadness.sln
Loading solution: /Users/nico/src/monomac/samples/ButtonMadness/ButtonMadness.sln
Loading projects ..
Building Solution: ButtonMadness (Debug)
Building: ButtonMadness (Debug)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.2.5/bin/mcs /noconfig "/r:/Library/Frameworks/Mono.framework/Versions/3.2.5/lib/mono/4.0/mscorlib.dll" -nostdlib
"/out:/Users/nico/src/monomac/samples/ButtonMadness/bin/Debug/ButtonMadness.exe" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.5/lib/mono/4.0/System.dll"
"/r:/Library/Frameworks/Mono.framework/Versions/3.2.5/lib/mono/4.0/System.Xml.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.5/lib/mono/4.0/System.Core.dll"
"/r:/Library/Frameworks/Mono.framework/Versions/3.2.5/lib/mono/4.0/System.Xml.Linq.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.5/lib/mono/4.0/System.Drawing.dll"
"/r:/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.2.5/lib/mono/4.0/System.Core.dll"
/nologo /warn:4 /debug:full /optimize- /codepage:utf8 "/define:DEBUG" /main:SamplesButtonMadness.MainClass /t:exe "/Users/nico/src/monomac/samples/ButtonMadness/Main.cs"
"/Users/nico/src/monomac/samples/ButtonMadness/AppDelegate.cs" "/Users/nico/src/monomac/samples/ButtonMadness/MainMenu.xib.designer.cs"
"/Users/nico/src/monomac/samples/ButtonMadness/DropDownButton.cs" "/Users/nico/src/monomac/samples/ButtonMadness/TestWindow.cs"
"/Users/nico/src/monomac/samples/ButtonMadness/TestWindowController.cs" "/Users/nico/src/monomac/samples/ButtonMadness/TestWindow.xib.designer.cs"
Compilation failed: 1 error(s), 0 warnings
/Users/nico/src/monomac/samples/ButtonMadness/TestWindowController.cs(65,15): error CS1061: Type `MonoMac.AppKit.NSMenu' does not contain a definition for `InsertItematIndex' and no extension
method `InsertItematIndex' of type `MonoMac.AppKit.NSMenu' could be found. Are you missing an assembly reference?
/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll (Location of the symbol related to previous error)
Build complete -- 1 error, 0 warnings
/Users/nico/src/monomac/samples/ButtonMadness/TestWindowController.cs(65,15) : error CS1061: Type `MonoMac.AppKit.NSMenu' does not contain a definition for `InsertItematIndex' and no extension method `InsertItematIndex' of type `MonoMac.AppKit.NSMenu' could be found. Are you missing an assembly reference?
make[1]: [all] Error 1 (ignored)
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C MicroSamples
make[2]: *** No rule to make target `../../src/MonoMac.dll', needed by `MonoMac.dll'. Stop.
make[1]: *** [all] Error 2
make: *** [all] Error 2
我该如何解决这个问题?
答案 0 :(得分:0)
我也是这样打的。它第一次成功,但每次都失败了。但是,我终于通过做一个
来实现它 make clean
make
然后它起作用了。