文件中缺少所需的架构 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
I am having trouble building my app after adding MapKit and CoreLocation frameworks. They are both 4.3 frameworks, and the app used to work fine with UIKit, CoreGraphics, and Foundation, just giving me problems with these two. Not sure what the required architecture is, there aren't any bugs in the code. Any help is appreciated!
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
添加 CoreLocation 框架,其中包含 CLLocation 以及 MapKit。
Add the CoreLocation framework, which has CLLocation, as well as MapKit.
我遇到了同样的问题..经过长时间的斗争我发现了这个问题..
我用这种方式解决了它..
现在它工作完美..希望它能帮助一些人..
I got the same issue.. after a long struggle I found the issue..
I resolved it this way..
Now it works perfectly.. hope it helps some one..
如果将框架从 Finder 复制到项目中,请务必小心。确保;将其添加到项目时,不会选中“复制文件...”选项。
检查项目的根文件夹以及是否已复制它。删除它并尝试从头开始添加。
强烈建议从 Xcode 的“构建阶段”、“链接二进制文件与库”部分添加。
Be careful if you copy the framework from Finder to the project. Ensure that; "Copy file ..." option is NOT checked when you add it to your project.
Check the root folder of your project and if you've copied it. Delete it and try to add from scratch.
Adding from "Build Phases", "Link Binary With Libraries" section of Xcode is highly recommended.
我在构建设置 -> 中使用了$(inherited)搜索路径
请参阅下面的 URL 了解 $(inherited) 的用法,
Xcode 搜索路径设置中的 $(inherited) 是什么?
I used $(inherited) in Build Settings -> Search paths
Refer below URL for $(inherited) usage,
What is $(inherited) in Xcode's search path settings?