简体   繁体   English

带有 Objective-C 文件的 Swift Cocoapods 给出了未定义的符号

[英]Swift Cocoapods with Objective-C files gives Undefined symbols

I have encountered the following error message:我遇到了以下错误消息:

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)

Have you tried enabling dynamic frameworks?您是否尝试过启用动态框架? That worked for me.那对我有用。

To do it go to the podfile in your workspace and open it, then:为此,请转到工作区中的 podfile 并打开它,然后:

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

这是次要的,但不要忘了退出Xcode和安装的CocoaPods后运行yourProject.xcworkspace代替yourProject.xcodeproj

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM