【发布时间】:2010-08-06 19:36:28
【问题描述】:
嗨,我已经为这些错误苦苦挣扎了一天。
我正在为 iphone 使用 TouchJSON 框架 (http://code.google.com/p/touchcode/)。在 iphone 模拟器上一切都可以正常编译,但是当我尝试在设备上编译时出现链接错误。
未定义的符号:
"___switch8", referenced from:
-[NetworkController constructByteMessage:command:] in NetworkController.o
-[CJSONScanner scanJSONObject:error:] in CJSONScanner.o
"___restore_vfp_d8_d15_regs", referenced from:
+[CJSONDataSerializer initialize] in CJSONDataSerializer.o
"___save_vfp_d8_d15_regs", referenced from:
+[CJSONDataSerializer initialize] in CJSONDataSerializer.o
"___switchu8", referenced from:
-[CJSONScanner scanJSONStringConstant:error:] in CJSONScanner.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
NetworkController 是我的一个类,它使用 touchJSON 方法来解析和生成 JSON。我认为这是导致大多数链接错误的 touchJSON 库,所以我尝试了另一个框架 json 框架,但它仍然导致 1 个错误。
我尝试从“调试”更改为“发布”,但仍然出现相同的错误。然后我尝试将 -all_load 和 -ObjC 添加到链接器标志,但它仍然出错。任何帮助或提示将不胜感激。
【问题讨论】: