在桥接 Objective C 文件中使用 Swift 类
Use Swift classes in Bridging Objective C files
我有一个项目是在 Swift 上编写的,但项目的某些部分是在 Objective-C++ 上编写的,以便与 C++ 库集成。我的 .mm 文件没有看到 Swift 类。我已经完成了 Can't use Swift classes inside Objective-C but still can't fix it. Auto-generated "project-Swift.h"
generates with errors. I've tried to delete pieces of code in which error occurred and it worked well, but this "project-Swift.h"
regenerates every time when I clean the project. Here is screenshot with errors link 的所有步骤。谢谢。
在包含桥接 header.
之前,您似乎没有包含定义缺失符号的 header,例如 NSViewController
我有一个项目是在 Swift 上编写的,但项目的某些部分是在 Objective-C++ 上编写的,以便与 C++ 库集成。我的 .mm 文件没有看到 Swift 类。我已经完成了 Can't use Swift classes inside Objective-C but still can't fix it. Auto-generated "project-Swift.h"
generates with errors. I've tried to delete pieces of code in which error occurred and it worked well, but this "project-Swift.h"
regenerates every time when I clean the project. Here is screenshot with errors link 的所有步骤。谢谢。
在包含桥接 header.
之前,您似乎没有包含定义缺失符号的 header,例如NSViewController