在iOS4.3中调试时使用了-fobjc_arc link参数,但是迁移到iOS5之后将其去掉后并不影响在iOS5中的运行和调试。但是一旦返回iOS4.3中则出现如下错误信息 dyld: Symbol notfound: _objc_retain Referenced from:/Users/ben/Library/Application Support/iPhoneSimulator/4.3.2/Applications/75915A97-7C3D-489A-B7B0-7B6895A4B584/ItsGoingUp.app/ItsGoingUp Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libobjc.A.dylib google的解答方法: Add -fobjc-arc in Build Settings =>Other Linker Flags (OTHER_LDFLAGS) for the different configurations You use it as a linker flag,not a compiler flag, so it doesn't affect ARC at compilation time, onlyat link time.
看来在iOS4.3的环境中如果使用了包含ARC特征的外部库,则必须加入此link标记,否则程序无法正常运行。