我正在尝试将Mono Runtime(v 3.0.4)与MonoMac应用程序合并,但自从升级到3.0.4(从2.10.11开始)后,这会失败并出现以下错误:
Merging Mono Runtime into app bundle
/Applications/MonoDevelop-old.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/mmp
-nolink "-minos=10.6.6"
-o "/Users/ted/Documents/XCode/Mac/StageTimer/StageTimer/bin/Release"
-n "StageTimer"
-a "/Library/Frameworks/Mono.framework/Versions/3.0.4/lib/mono/4.0/System.dll"
-a "/Library/Frameworks/Mono.framework/Versions/3.0.4/lib/mono/4.0/System.Xml.dll"
-a "/Library/Frameworks/Mono.framework/Versions/3.0.4/lib/mono/4.0/System.Core.dll"
-a "/Library/Frameworks/Mono.framework/Versions/3.0.4/lib/mono/4.0/System.Xml.Linq.dll"
-a "/Library/Frameworks/Mono.framework/Versions/3.0.4/lib/mono/4.0/System.Drawing.dll"
-a "/Applications/MonoDevelop-old.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll"
"/Users/ted/Documents/XCode/Mac/StageTimer/StageTimer/bin/Release/StageTimer.exe"
Process exited with code 1, command:
pkg-config --variable=prefix mono-2
Unhandled Exception: System.IO.DirectoryNotFoundException: Directory '/lib/mono/4.0' not found.
即使我将MonoDevelop配置为使用Mono 2.10.11而不是3.0.4,它也会失败并出现相同的错误(和路径:'/ lib / mono / 4.0')。接下来我也尝试修改/Library/Frameworks/Mono.framework/Versions/Current中的符号链接指向2.10.11,但仍然是相同的错误&路径。
任何有单声道和单声道的人知道如何配置的pkg-config技能?
答案 0 :(得分:1)
当一个人试图将它与Mono 3.0.4(而不是3.0.3)一起运行时,F#编译器也发生了类似的问题。问题归结为Mono中的错误修正,可以防止自制pkg-config设置发生冲突。 F#源中采用的workaround是将路径硬编码为Mono的pkg-config。
通过以这种方式启动MonoDevelop时重写环境变量PKG_CONFIG_PATH,你可能得到与此相同的结果:
PKG_CONFIG_PATH=/path/were/mono/pc/files/are/in/Mac:$PKG_CONFIG_PATH monodevelop
确切路径必须位于/Library/Frameworks/Mono.framework/Versions/Current/下方,只需注意扩展名为.pc的文件。