Win 7 64bit gmcs hello.cs -pkg:gtk-sharp-2.0 上的 Mono 开发环境找不到文件 [英] Mono Development Environment on Win 7 64bit gmcs hello.cs -pkg:gtk-sharp-2.0 can't find files
问题描述
我下载了 Mono 并安装在 Win 7 64bit 上
I downloaded Mono and installed it on Win 7 64bit
我去了这个网站按照说明http://www.mono-project.com/Mono_Basics
I went to this site to follow the instructions http://www.mono-project.com/Mono_Basics
我打开单声道命令提示符并编译并运行控制台 hello world
I opened up the mono command prompt and compiled and ran the console hello world
然后我尝试用
gmcs hello.cs -pkg:gtk-sharp-2.0
我明白了
C:CodeNoControlMono>gmcs hello.cs -pkg:gtk-sharp-2.0
error CS0006: Metadata file `C:/PROGRA~2/MONO-2~1.8/lib/mono/gtk-sharp-2.0/pango-sharp.dll' could not be found
error CS0006: Metadata file `C:/PROGRA~2/MONO-2~1.8/lib/mono/gtk-sharp-2.0/atk-sharp.dll' could not be found
error CS0006: Metadata file `C:/PROGRA~2/MONO-2~1.8/lib/mono/gtk-sharp-2.0/gdk-sharp.dll' could not be found
error CS0006: Metadata file `C:/PROGRA~2/MONO-2~1.8/lib/mono/gtk-sharp-2.0/gtk-sharp.dll' could not be found
error CS0006: Metadata file `C:/PROGRA~2/MONO-2~1.8/lib/mono/gtk-sharp-2.0/glib-sharp.dll' could not be found
Compilation failed: 5 error(s), 0 warnings
我该如何解决这个问题?
How do I fix this?
这类似于这里的问题 cannot使用未回答的单声道命令提示符为 gtk# 编译 hello.cs.
This is the similar to the question here cannot compile hello.cs for gtk# using mono command prompt which was not answered.
- -pkg 可以在 Windows 上运行吗?
- 我需要额外下载一些东西吗?
- 缩写路径提到 ~1.8/应该说类似于 ~10.8我的单声道版本是 2.10.8 吗?
推荐答案
这些答案有助于指出问题的根本原因.但是,到目前为止,最简单的解决方案是将 Mono 安装到名称中没有空格的文件夹中.安装时,只需选择C:SDKMono"之类的内容.问题已解决,无需任何时髦的变通方法.
These were helpful answers for pointing out the root cause of the problem. However, the simplest solution by far is to install Mono into a folder that doesn't have spaces in the name. While installing, just select something like "C:SDKMono". Problem solved, and no funky work-arounds necessary.
这篇关于Win 7 64bit gmcs hello.cs -pkg:gtk-sharp-2.0 上的 Mono 开发环境找不到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!