尝试为控制台创建一个可以在 Linux 上运行的独立应用程序,工作环境在 Mac os x 10.7 上。
1.) 打开 Monodevelop 并创建新的解决方案,一个“C# 控制台项目”。2.) 构建应用程序,exe 将在 bin/Release 文件夹中创建 3.) 在 mac os x 打开终端,转到文件夹并键入: mkbundle -o HelloTest HelloWorld.exe --deps
这将发生:
OS is: Darwin
Sources: 1 Auto-dependencies: True
embedding: /Users/fredrickbacker/Documents/Mono/HelloWorld/HelloWorld/bin/Release/HelloWorld.exe
embedding: /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/mscorlib.dll
Compiling:
as -arch i386 -o temp.o temp.s
cc -arch i386 -g -o HelloTest -Wall temp.c `pkg-config --cflags --libs mono-2` temp.o
temp.c:2:39: error: mono/metadata/mono-config.h: No such file or directory
temp.c:3:36: error: mono/metadata/assembly.h: No such file or directory
temp.c:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘assembly_bundle_HelloWorld_exe’
temp.c:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘assembly_bundle_mscorlib_dll’
temp.c:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
temp.c:22: error: ‘NULL’ undeclared here (not in a function)
temp.c: In function ‘mono_mkbundle_init’:
temp.c:26: warning: implicit declaration of function ‘mono_register_bundled_assemblies’
temp.c:26: error: ‘bundled’ undeclared (first use in this function)
temp.c:26: error: (Each undeclared identifier is reported only once
temp.c:26: error: for each function it appears in.)
temp.c: In function ‘main’:
temp.c:118: warning: implicit declaration of function ‘mono_set_dirs’
[Fail]
关于我做错了什么有什么建议吗?想要一个从 osx 开发的独立 linux 应用程序。拉我的头发几个小时。