无法再链接嵌入式MonoTouch iPhone应用程序

时间:2011-03-22 17:45:56

标签: iphone xcode linker mono xamarin.ios

我正在尝试将Mono库和MonoTouch嵌入到iPhone应用程序中。我有一切正常,然后我的机器上发生了一些事情(MonoTouch更新?),现在我无法在定位设备时链接应用程序。一切都为模拟器构建良好,但在定位设备时我收到了一千多个警告和一些错误。它试图链接的Mono库是错误的架构。

ld: warning: ARM function mono_aot_version not 4-byte aligned
ld: warning: ARM function mono_aot_full_aot not 4-byte aligned
ld: warning: ARM function mono_runtime_version not 4-byte aligned
ld: warning: ARM function mono_aot_assembly_name not 4-byte aligned
ld: warning: ARM function name_0 not 4-byte aligned
ld: warning: ARM function name_1 not 4-byte aligned
ld: warning: ARM function name_2 not 4-byte aligned
...
... lots of these warnings
...
ld: warning: ARM function name_53 not 4-byte aligned
ld: warning: ARM function name_54 not 4-byte aligned
ld: warning: ARM function name_55 not 4-byte aligned
ld: warning: ARM function name_56 not 4-byte aligned
ld: warning: ignoring file /Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmono.a, file was built for archive which is not the architecture being linked (armv7)
ld: warning: ignoring file /Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonotouch.a, file was built for archive which is not the architecture being linked (armv7)
Undefined symbols for architecture armv7:
  "_monotouch_setup_classmap", referenced from:
      _monotouch_create_classes in registrar.o
  "_mono_object_new", referenced from:
      -[CalcEvaluator init] in CalcEvaluator.o
  "_mono_aot_register_module", referenced from:
      -[CalcEvaluator init] in CalcEvaluator.o
  "_mono_jit_init", referenced from:
  -[CalcEvaluator init] in CalcEvaluator.o
  "_mono_runtime_object_init", referenced from:
      -[CalcEvaluator init] in CalcEvaluator.o
  "_mono_assembly_get_image", referenced from:
      -[CalcEvaluator init] in CalcEvaluator.o
  "_mono_assembly_open", referenced from:
      -[CalcEvaluator init] in CalcEvaluator.o
  "_mono_jit_set_aot_only", referenced from:
      -[CalcEvaluator init] in CalcEvaluator.o
  "_mono_class_from_name", referenced from:
      -[CalcEvaluator init] in CalcEvaluator.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status

我的猜测是它与MonoTouch没有被激活有关。我已经尝试重新安装MonoTouch并重新激活MonoTouch。对错误都没有任何影响。

其他链接标记

-ObjC -L/Developer/MonoTouch/SDKs/MonoTouch.$(PLATFORM_NAME).sdk/usr/lib -lmono -lmonotouch -all_load

单声道版

$ mono -V
Mono JIT compiler version 2.6.7 (tarball Tue Aug 24 16:33:27 MDT 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS:           normal
GC:            Included Boehm (with typed GC)
SIGSEGV:       normal
Notification:  Thread + polling
Architecture:  x86
Disabled:      none

MonoTouch版本

$ /Developer/MonoTouch/usr/bin/mtouch --version
mtouch 3.2.6.9797

我可以使用同一个项目并在另一台机器上构建它并按预期构建。非常感谢任何帮助追踪这一点。

1 个答案:

答案 0 :(得分:2)

4.3 SDK不允许将armv6库链接到armv7应用程序。将应用程序仅更改为目标armv6,或升级到MonoTouch 4。