2
試圖爲可在Linux上工作的控制檯創建獨立應用程序,工作環境位於Mac OS X 10.7上。Mono c#控制檯應用程序,使用mkbundle錯誤創建獨立程序
1.)打開Monodevelop並創建一個新的解決方案,一個「C#控制檯項目」。 mkbundle -o HelloTest HelloWorld.exe的--deps
: 2.)建立該應用中,exe將在倉/ Release文件夾 3.)在Mac OS X的開路端,轉到文件夾和類型創建這將發生:
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]
對我在做什麼有什麼建議嗎?需要一個獨立的Linux應用程序,從osx開發。拉我的頭髮好幾個小時。
MacPack是否適合您? –