0

由于以下帮助,我尝试将我的应用程序与 mkbundle 命令捆绑在一起:

http://www.mono-project.com/Guide:Running_Mono_Applications#Bundles

但我不明白这个文档的这一部分:

With -c, the further option --nomain will generate the host.c file without a main method so that you can embed it as a library in an existing native application in which you are embedding the Mono runtime yourself. Just call mono_mkbundle_init() before initializing the JIT to make the bundled assemblies available.

这绝对是我需要做的!我还查了这个文档: http: //man.he.net/man1/mkbundle2

再次相同的部分:

You may also use mkbundle to generate a bundle you can use when  embed-
   ding  the Mono runtime in a native application.  In that case, use both
   the -c and --nomain options.  The resulting host.c file will not have a
   main() function.  Call mono_mkbundle_init() before initializing the JIT
   in your code so that the bundled assemblies are available to the embed-
   ded runtime.

我真的不知道是什么mono_mkbundle_init()...initializing the JIT谢谢

4

1 回答 1

0

mono_mkbundle_init() 是 mkbundle 在 host.c 中生成的一个函数“初始化 JIT”应该是单声道函数 mono_jit_init() 所以意思是,在你的原生应用程序中链接生成的 c 文件并在调用 mono_jit_init() 之前调用 mono_mkbundle_init()

于 2014-07-02T09:11:25.397 回答