用于在iPhone应用程序中添加iAd Banner的Apple Mach-O链接器错误

时间:2012-09-04 15:33:50

标签: iphone iad

尝试使用以下代码在应用中添加iAd Banner视图:

adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
adView.frame = CGRectOffset(adView.frame, 0, -50);
adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
adView.backgroundColor = [UIColor clearColor];
adView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;

正在提供Apple Mach-O链接器错误

Undefined symbols for architecture armv6:
"_CGRectOffset", referenced from:
  -[ContainerViewController viewDidLoad] in ContainerViewController.o
"_CGRectZero", referenced from:
  -[ContainerViewController viewDidLoad] in ContainerViewController.o
ld: symbol(s) not found for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如果有人可以指导需要修复的内容以消除这些错误。

感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

确保您链接CoreGraphics框架。