首页 > 解决方案 > 带有 Objective-C 文件的 Swift Cocoapods 给出了未定义的符号

问题描述

我遇到了以下错误消息:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_VTapManager", referenced from:
      objc-class-ref in VTapManagerHelper.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

标签: iosobjective-cswiftiphonexcode

解决方案


您是否尝试过启用动态框架?这对我有用。

为此,请转到工作区中的 podfile 并打开它,然后:

#Uncomment the next line if you're using Swift or would like to use dynamic frameworks
remove the hash here ->  #use_frameworks!

推荐阅读