我想将DDMathParser库与 Objective-C 一起使用,但它是用 Swift 编写的。这是我到目前为止所尝试的:
#import <MathParser/MathParser.h>
// ...
// This throws error:
Expression *e;
这不会构建,因为编译器找不到 DDMathParser 声明的“表达式”类型。我还尝试将我的导入语句切换为:
#import <MathParser/MathParser-Swift.h>
但仍然没有运气。
我无法在网上找到在 Objective-C 中使用这个库的任何示例。我是 Objective-C 的新手,所以我什至不知道要使用什么 import 语句;也许其他人会发现这个常识?