ios - 台风构建架构错误

标签 ios xcode cocoapods typhoon

错误:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_TyphoonAssembly", referenced from:
      _OBJC_CLASS_$_AppAssembly in AppAssembly.o
  "_OBJC_CLASS_$_TyphoonBlockComponentFactory", referenced from:
      objc-class-ref in AppAssembly.o
  "_OBJC_CLASS_$_TyphoonComponentFactory", referenced from:
      objc-class-ref in AppDelegate.o
      objc-class-ref in UIViewController+PropertyInjector.o
      objc-class-ref in ReminderViewController.o
      objc-class-ref in AppAssembly+AddReminder.o
      objc-class-ref in DashboardViewController.o
      objc-class-ref in AppAssembly+Dashboard.o
  "_OBJC_CLASS_$_TyphoonDefinition", referenced from:
      objc-class-ref in AppAssembly.o
      objc-class-ref in AppAssembly+ViewControllers.o
      objc-class-ref in AppAssembly+Actions.o
      ...
  "_OBJC_METACLASS_$_TyphoonAssembly", referenced from:
      _OBJC_METACLASS_$_AppAssembly in AppAssembly.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

构建配置、架构是什么。我在用 cocoa pod ,XCode 7.1,目标 iOS 版本为 8.4。我该如何解决这个构建错误?


播客文件


source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'

xcodeproj 'Proj'


pod 'KGModal'
pod 'JSONKit'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'TTTAttributedLabel'

target :Proj, :exclusive => true do
    # pod 'Typhoon', :head
end

target :ProjTest, :exclusive => true do
    pod 'Kiwi'
end

Podfile 安装输出


Update all pods    
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using Typhoon (3.4.1)
Using Bolts (1.4.0)
Using FBSDKCoreKit (4.7.1)
Using FBSDKLoginKit (4.7.1)
Using FBSDKShareKit (4.7.1)
Using JRSwizzle (1.0)
Using JSONKit (1.4)
Using KGModal (1.2.0)
Using Kiwi (2.4.0)
Using TTTAttributedLabel (1.13.4)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 8 dependencies from the Podfile and 9
total pods installed.

这是 pod 更新输出,终端中没有其他错误,我将 $(inherited) 添加到链接器搜索路径

最佳答案

这是一个基本错误,因为您的 Xcode 无法通过 pod 搜索您想要的库。在安装 cocoapods 之前尝试以下步骤:

  1. 清理你的项目
  2. 删除您想要通过 Cocoapods 包含的所有库。
  3. 在build设置的链接器搜索路径中添加 $inherited
  4. 按照 Cococapods.org 上给出的所有 cocoapods 安装步骤进行操作。
  5. 检查终端中可能出现的任何错误。 如果有错误纠正他们,并重新安装podfile
  6. 安装 podfile 后再次清理您的项目(cmd + shift + k)。

最后,如果您已完成所有这些步骤但仍然显示此错误。检查您要导入的库是通过 pod 还是手动导入的。将它们更改为 #import <AFNetworking/AFNetworking.h>亲切。

如果仍然出现错误,请发表评论。

关于ios - 台风构建架构错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33560278/

相关文章:

ios - 为什么我的 MKPointAnnotation 不可拖动,我该如何更改它?

c - 在 Xcode 上打开函数 C "file not found"但终端可以工作

ios - 无法导入桥接头 xcode 6.4

macos - 在 macOS Big Sur 上安装 cocoa pod 时出错

ios - UIViewController 下的黑色或灰色背景,具有模糊效果

ios - 无法同时满足约束错误导致 IOS 9 中的屏幕闪烁

swift - 调用costToNode : in subclassed GKGraphNode2D with GameplayKit

ios - SwiftUI 按钮图像显示为黑色

swift - Xcode 错误 : building for iOS Simulator, 但在为 iOS 构建的目标文件中链接

ios - 来自终止状态的可操作通知