且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

静态库的应用程序在模拟器上运行,但在实际设备上运行

更新时间:2023-10-20 21:33:58

我必须进行两项更改才能在iphone上正常工作:

I had to make two changes to get this working correctly on the iphone:


  1. 链接器行为必须设置链接所有程序集选项。

  2. 我必须添加 -framework Security 到gcc_flags。

  1. linker behavior in the build options had to have the option Link all assemblies set.
  2. I had to add -framework Security to the gcc_flags.

所以构建选项下的其他monotouch参数必须具有以下内容价值:

So additional monotouch arguments under the build options had to have the following value:

-v -v -v -gcc_flags-framework Security -lstdc ++ -I $ {ProjectDir} / Ultralite / Include -L $ {ProjectDir} / Ultralite - lUltralite -force_load $ {ProjectDir} /Ultralite/libUltralite.a

-v -v -v -gcc_flags "-framework Security -lstdc++ -I${ProjectDir}/Ultralite/Include -L${ProjectDir}/Ultralite -lUltralite -force_load ${ProjectDir}/Ultralite/libUltralite.a"

我必须添加安全框架的原因是,当时,MonoTouch似乎包含此框架不在构建选项中指定链接,但在其他两个选项时不包括它重启。我通过比较不同选项的构建日志来确定这一点。

The reason I had to add the Security framework is that it seems MonoTouch includes this framework when Don't link is specified in the build options, but does not include it when the other two options are set. I determined this by comparing the build logs for the different options.