文件中缺少所需的架构 i386

发布于 2024-10-30 08:34:07 字数 774 浏览 2 评论 0原文

添加 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

じее 2024-11-06 08:34:07

添加 CoreLocation 框架,其中包含 CLLocation 以及 MapKit。

Add the CoreLocation framework, which has CLLocation, as well as MapKit.

守不住的情 2024-11-06 08:34:07

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

我用这种方式解决了它..

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

现在它工作完美..希望它能帮助一些人..

I got the same issue.. after a long struggle I found the issue..

I resolved it this way..

  1. Go to Build Settings
  2. Search for 'framework search path'
  3. And delete the pre filled path.

Now it works perfectly.. hope it helps some one..

北笙凉宸 2024-11-06 08:34:07

如果将框架从 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.

辞旧 2024-11-06 08:34:07

我在构建设置 -> 中使用了$(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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文