我使用了这个问题的答案,为Objective-C对象列出了选择器,并列出了我的类对象正在响应的所有选择器.在一个巨大的列表中,我找到了一个名为".cxx_destruct"的选择器(是的,它以点开头),我第一次看到这个,并且从未听说过它.我用Google搜索并找到了这个目标C:ARC错误(自动释放问题).
我脑子里有些问题吗?
直到xcode 4 final(我在可用的时候使用3.latest和4 GM)这没有发生.当我升级到xcode 4最终版本时,我在尝试将armv7版本与我的非armv7库链接时开始出现链接错误(我的项目使用默认的标准armv6 armv7有效架构设置):
ld: warning: ignoring file ../bin/iOS static/arm/libssl.a, file was built for archive which is not the architecture being linked (armv7)
ld: warning: ignoring file ../bin/iOS static/arm/libcrypto.a, file was built for archive which is not the architecture being linked (armv7)
Undefined symbols for architecture armv7: -- list of symbols --
Run Code Online (Sandbox Code Playgroud)
armv6版本编译得很好,但整个编译过程失败,出现77个链接错误.
我理解这是预期的行为,它不会与armv6 lib链接到armv7.该修复程序仅将我的项目设置为armv6.我的问题是:为什么这在xcode的早期版本中有效?
如果我只设置为armv6,我会开始收到此警告:
Check dependencies
[BWARN]warning: all apps should include an armv7 architecture (current ARCHS = "armv6").
Run Code Online (Sandbox Code Playgroud)
我不喜欢看到警告:-)任何人有类似的问题?
谢谢,
费尔南多
我在iOS模拟器4.3中遇到编译错误我实际上无法弄明白,我得到的错误是:
dyld: lazy symbol binding failed: Symbol not found: _objc_retain
Referenced from: /Users/ben/Library/Application Support/iPhone Simulator/4.3.2/Applications/75915A97-7C3D-489A-B7B0-7B6895A4B584/AppName.app/AppName
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libobjc.A.dylib
dyld: Symbol not found: _objc_retain
Referenced from: /Users/ben/Library/Application Support/iPhone Simulator/4.3.2/Applications/75915A97-7C3D-489A-B7B0-7B6895A4B584/AppName.app/AppName
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libobjc.A.dylib
Run Code Online (Sandbox Code Playgroud)
注:
该库被引用(libobjc.A.dylib)实际上是在"预期的地方"的代码工作正常的iOS5的设备上,并在iOS5的模拟器.