我无法为iOS模拟器构建iPhone项目。该设备的构建实际上是有效的。 错误在于RestKit外部库。 这是我得到的:
ld: warning: ignoring file /Users/omar/Library/Developer/Xcode/DerivedData/Zolkin-geukgbaipukxjhacrofvkapbkmme/Build/Products/Debug-iphonesimulator/libRestKit.a, file was built for archive which is not the architecture being linked (i386): /Users/omar/Library/Developer/Xcode/DerivedData/Zolkin-geukgbaipukxjhacrofvkapbkmme/Build/Products/Debug-iphonesimulator/libRestKit.a Undefined symbols for architecture i386: "_OBJC_CLASS_$_AFJSONRequestOperation", referenced from: objc-class-ref in GoogleMapsService.o "_OBJC_CLASS_$_RKAttributeMapping", referenced from: objc-class-ref in Distric.o "_OBJC_CLASS_$_RKObjectManager", referenced from: objc-class-ref in BaseService.o "_OBJC_CLASS_$_RKObjectMapping", referenced from: objc-class-ref in User.o objc-class-ref in City.o objc-class-ref in Distric.o objc-class-ref in ServerTimeInterval.o objc-class-ref in Address.o objc-class-ref in StoreDetails.o objc-class-ref in Store.o ... "_OBJC_CLASS_$_RKObjectRequestOperation", referenced from: objc-class-ref in BaseService.o "_OBJC_CLASS_$_RKRelationshipMapping", referenced from: objc-class-ref in Address.o objc-class-ref in StoreDetails.o objc-class-ref in Store.o objc-class-ref in Consumer.o objc-class-ref in PaginatedStoreListResponse.o objc-class-ref in ExtractResponse.o objc-class-ref in CategoryData.o ... "_OBJC_CLASS_$_RKResponseDescriptor", referenced from: objc-class-ref in BaseService.o "_RKlcl_configure_by_name", referenced from: -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
非常感谢任何帮助......
由于 奥马
答案 0 :(得分:0)
这通常意味着.m文件未列在目标的构建阶段中的编译源下。有时,Xcode会让您手动添加.m文件。
试试这个
TargetSettings - >构建阶段 - >编译源 - >添加.m类 - >构建并运行
要注意的另一件事是名称冲突。确保所有类都具有唯一名称,否则您可能会遇到类似神秘的铿锵错误
如果这些都不起作用,请查看此主题。如果您在模拟器中运行,它可能会尝试使用错误的处理器架构。
file was built for archive which is not the architecture being linked (i386)