目标C:ARC错误(自动释放问题) [英] Objective C: ARC errors (Automatic release problems)

查看:213
本文介绍了目标C:ARC错误(自动释放问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Xcode 4 Final - armv6 armv7问题,同时链接armv6库

在我运行iOS 4.3.3的实际手机上配置之前,一切正常。
我打开了自动参考,所以我不必担心发布任何东西,但也许我做错了,不发布的概念对我来说是新的。我收到这些错误:

Everything was working fine until I provisioned on my actual phone running iOS 4.3.3. I have automatic referencing turned on so I don't have to worry about releasing anything, but maybe I'm doing something wrong, the concept of not releasing is new to me. I get these great error:

Undefined symbols for architecture armv7:
"_objc_storeStrong", referenced from:
  -[AppDelegate .cxx_destruct] in AppDelegate.o
  -[DistanceViewController .cxx_destruct] in DistanceViewController.o
  -[SlopeViewController .cxx_destruct] in SlopeViewController.o
  -[MidpointViewController .cxx_destruct] in MidpointViewController.o
  -[AreaViewController .cxx_destruct] in AreaViewController.o
  -[PerimeterViewController .cxx_destruct] in PerimeterViewController.o
  -[VolumeViewController .cxx_destruct] in VolumeViewController.o
  ...
"_objc_retain", referenced from:
  +[__ARCLite__ load] in libarclite_iphoneos.a(arclite.o)
  -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
  -[AppDelegate applicationWillResignActive:] in AppDelegate.o
  -[AppDelegate applicationDidEnterBackground:] in AppDelegate.o
  -[AppDelegate applicationWillEnterForeground:] in AppDelegate.o
  -[AppDelegate applicationDidBecomeActive:] in AppDelegate.o
  -[AppDelegate applicationWillTerminate:] in AppDelegate.o
  ...
 (maybe you meant: _objc_retainedObject)
"_objc_release", referenced from:
  _main in main.o
  -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
  -[AppDelegate applicationWillResignActive:] in AppDelegate.o
  -[AppDelegate applicationDidEnterBackground:] in AppDelegate.o
  -[AppDelegate applicationWillEnterForeground:] in AppDelegate.o
  -[AppDelegate applicationDidBecomeActive:] in AppDelegate.o
  -[AppDelegate applicationWillTerminate:] in AppDelegate.o
  ...
"_objc_retainAutoreleasedReturnValue", referenced from:
  _main in main.o
  -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
  -[ViewController alertView:clickedButtonAtIndex:] in ViewController.o
  -[ViewController viewDidLoad] in ViewController.o
  -[DistanceViewController done:] in DistanceViewController.o
  -[DistanceViewController solve:] in DistanceViewController.o
  -[DistanceViewController viewDidLoad] in DistanceViewController.o
  ...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)


推荐答案

这是关于同一件事的另一个问题的链接,它在Stackoverflow上解决了所以我希望这个信息将帮助您。
ARC错误

Here is a link to another question about the same thing, it was solved here on Stackoverflow So i hope this information will help you. ARC Error

这篇关于目标C:ARC错误(自动释放问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆