Mono 3.4.0 mkbundle under Mac OS X failed

半城伤御伤魂 提交于 2019-12-02 02:57:08

To clarify, you need to add the following to that last cc command:

-framework CoreFoundation -lobjc -liconv 

So in your case the command:

cc -arch i386 -o client-patcher -Wall pkg-config --cflags mono-2 temp.c -lz pkg-config --libs-only-L mono-2 pkg-config --variable=libdir mono-2/libmono-2.0.a pkg-config --libs-only-l mono-2 | sed -e "s/\-lmono-2.0 //" temp.o

Should be re-written with those flags in front of cc:

cc -framework CoreFoundation -lobjc -liconv -arch i386 -o client-patcher -Wall pkg-config --cflags mono-2 temp.c -lz pkg-config --libs-only-L mono-2 pkg-config --variable=libdir mono-2/libmono-2.0.a pkg-config --libs-only-l mono-2 | sed -e "s/-lmono-2.0 //" temp.o

Simply cut/paste that last cc command, add those flags to it, cut/paste back into the terminal, hit enter and enjoy.

You need to link the binary with the CoreFoundation framework. This is a recent change in Mono 3.4 as per the Mono 3.4 release notes. A similar issue was reported a while ago.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!