Mono 3.4.0 mkbundle under Mac OS X failed

后端 未结 2 519
予麋鹿
予麋鹿 2021-01-22 07:58

I`m trying to make static binary under MAC OS X 10.9 (Mavericks) which is not require mono runtime. This is almost clean machine with the latest updates and the latest XCode.

2条回答
  •  野的像风
    2021-01-22 08:31

    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.

提交回复
热议问题