在文件中缺少必需的体系结构i386

F3d*_*r3r 12 iphone core-location mapkit i386

添加MapKit和CoreLocation框架后,我无法构建我的应用程序.它们都是4.3框架,用于与UIKit,CoreGraphics和Foundation一起工作的应用程序,只是给我这两个问题.不确定所需的架构是什么,代码中没有任何错误.任何帮助表示赞赏!

ld: warning: ignoring file /Users/F3d3r3r/Desktop/testNav4_3/MapKit.framework/MapKit, missing required architecture i386 in file

ld: warning: ignoring file /Users/F3d3r3r/Desktop/testNav4_3/CoreLocation.framework/CoreLocation, missing required architecture i386 in file

Undefined symbols for architecture i386:
  "_CLLocationCoordinate2DMake", referenced from:
       -[Layer2 tableView:cellForRowAtIndexPath:] in Layer2.o
  "_OBJC_CLASS_$_MKMapView", referenced from:
       objc-class-ref in Layer2.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

Ray*_*eck 45

添加具有CLLocation的CoreLocation框架以及MapKit.

  • 我添加了CoreLocation和MapKit. (2认同)

Dil*_*mar 7

我遇到了同样的问题..经过长时间的斗争,我发现了这个问题..

我这样解决了..

  1. 转到构建设置
  2. 搜索"框架搜索路径"
  3. 并删除预填充路径.

现在它完美地工作..希望它有助于一些..