objective-c – 部署到10.6时出现ARC错误

objective-c – 部署到10.6时出现ARC错误,第1张

概述我的应用程序运行并在10.7上测试但后来意识到我需要它才能在早期版本上运行.不幸的是,我从一开始就用ARC开始了这个项目. 现在我的构建设置是debug base sdk:10.7,release base sdk:10.6.当我尝试存档我的应​​用程序时,我收到以下错误: Undefined symbols for architecture x86_64:"_objc_retain", ref 我的应用程序运行并在10.7上测试但后来意识到我需要它才能在早期版本上运行.不幸的是,我从一开始就用ARC开始了这个项目.

现在我的构建设置是deBUG base sdk:10.7,release base sdk:10.6.当我尝试存档我的应​​用程序时,我收到以下错误:

Undefined symbols for architecture x86_64:"_objc_retain",referenced from:  +[__ARClite__ load] in libarclite_macosx.a(arclite.o)  -[AppDelegate applicationDIDFinishLaunching:] in AppDelegate.o  -[AppDelegate managedobjectModel] in AppDelegate.o  -[AppDelegate persistentStoreCoordinator] in AppDelegate.o  -[AppDelegate managedobjectContext] in AppDelegate.o  -[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o  -[AppDelegate saveAction:] in AppDelegate.o  ... (maybe you meant: _objc_retainedobject)"_objc_release",referenced from:  -[AppDelegate applicationDIDFinishLaunching:] in AppDelegate.o  -[AppDelegate applicationfilesDirectory] in AppDelegate.o  -[AppDelegate managedobjectModel] in AppDelegate.o  -[AppDelegate persistentStoreCoordinator] in AppDelegate.o  -[AppDelegate managedobjectContext] in AppDelegate.o  -[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o  -[AppDelegate saveAction:] in AppDelegate.o  ..."_objc_retainautoreleasedReturnValue",referenced from:  -[AppDelegate applicationfilesDirectory] in AppDelegate.o  -[AppDelegate managedobjectModel] in AppDelegate.o  -[AppDelegate persistentStoreCoordinator] in AppDelegate.o  -[AppDelegate managedobjectContext] in AppDelegate.o  -[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o  -[AppDelegate saveAction:] in AppDelegate.o  -[AppDelegate applicationShouldTerminate:] in AppDelegate.o  ..."_objc_autoreleaseReturnValue",referenced from:  -[AppDelegate applicationfilesDirectory] in AppDelegate.o  -[AppDelegate managedobjectModel] in AppDelegate.o  -[AppDelegate persistentStoreCoordinator] in AppDelegate.o  -[AppDelegate managedobjectContext] in AppDelegate.o  -[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o  -[MainWindowController vIEwForTag:] in MainWindowController.o  -[MainWindowController tableVIEw:objectValueFortableColumn:row:] in MainWindowController.o  ..."_objc_storeStrong",referenced from:  -[AppDelegate persistentStoreCoordinator] in AppDelegate.o  -[AppDelegate saveAction:] in AppDelegate.o  -[AppDelegate applicationShouldTerminate:] in AppDelegate.o  -[AppDelegate .cxx_destruct] in AppDelegate.o  -[MainWindowController init] in MainWindowController.o  -[MainWindowController vIEwForTag:] in MainWindowController.o  -[MainWindowController showUserFinderVIEw:] in MainWindowController.o  ..."_objc_retainautoreleaseReturnValue",referenced from:  +[MainWindowController sharedInstance] in MainWindowController.o  -[fileMetaData getfilename] in fileMetaData.o  -[fileMetaData getLastHash] in fileMetaData.o  -[fileMetaData getCreationDate] in fileMetaData.o  -[fileMetaData getLastModifIEd] in fileMetaData.oe  -[fileMetaData getLocalPath] in fileMetaData.o  ..."_objc_autorelease",referenced from:  -[SBJsonParser objectWithString:error:] in SBJsonParser.o  -[SBJsonTokeniser getStringToken:] in SBJsonTokeniser.o  -[SBJsonTokeniser getNumberToken:] in SBJsonTokeniser.o  -[SBJsonUTF8Stream getRetainedStringFragment:] in SBJsonUTF8Stream.o  -[SBJsonWriter stringWithObject:error:] in SBJsonWriter.o"_objc_retainautorelease",referenced from:  -[SBJsonTokeniser getStringToken:] in SBJsonTokeniser.old: symbol(s) not found for architecture x86_64clang: error: linker command Failed with exit code 1 (use -v to see invocation)

它似乎是ARC的一个问题,但我不知道从哪里开始修复它.有什么建议?谢谢.

解决方法 您需要将SDK设置为10.7 – 但您可以将部署目标设置为10.6.虽然在这个问题中详细说明,但有一些警告: How to deploy to Snow Leopard with ARC enabled 总结

以上是内存溢出为你收集整理的objective-c – 部署到10.6时出现ARC错误全部内容,希望文章能够帮你解决objective-c – 部署到10.6时出现ARC错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1013518.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存