Xcode 4、iOS SDK 4.3 和带有 Greystripe 广告解决方案的未定义符号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5936269/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 4, iOS SDK 4.3 & Undefined symbols with Greystripe Ad Solution
提问by BingoBoy
I recently upgraded to Xcode 4 / iOS SDK 4.3 and am now having problems with GreyStripe's ad solution when building with base SDK 4.3. Previously I was building with Xcode 3 and a base SDK of 4.0 and Greystripe's ads were working fine.
我最近升级到 Xcode 4 / iOS SDK 4.3,现在在使用基础 SDK 4.3 构建时遇到了 GreyStripe 的广告解决方案的问题。以前,我使用 Xcode 3 和 4.0 的基础 SDK 进行构建,Greystripe 的广告运行良好。
Now when I build using base SDK 4.3, I get the following error:
现在,当我使用基础 SDK 4.3 构建时,出现以下错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GSAdSlotDescription", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_GSAdEngine", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
This occurs when I build for iPhone 4.0 simulator, 4.1 simulator and 4.2 simulator and 4.3 simulator.
当我为 iPhone 4.0 模拟器、4.1 模拟器和 4.2 模拟器和 4.3 模拟器构建时会发生这种情况。
What's the problem here?
这里有什么问题?
Cheers.
干杯。
回答by Say2Manuj
Just add the class file [eg : FileOperations.m] in Compile sources which is located in the Project target.
只需在位于项目目标中的编译源中添加类文件 [例如:FileOperations.m]。
回答by Konstantin Chugalinskiy
To fix this open your project properties and find "architectures" and "valid architectures" properties. Click on both of them and select "Other". Then add i386 architecture.
要解决此问题,请打开您的项目属性并找到“架构”和“有效架构”属性。单击它们并选择“其他”。然后添加i386架构。
I think the problem is that simulator is run on i386 system (your mac). But I'm surprised why this error doesn't appear in xcode 3.2.6.
我认为问题在于模拟器在 i386 系统(您的 mac)上运行。但我很惊讶为什么这个错误没有出现在 xcode 3.2.6 中。