I'd like to use the DDMathParser library with Objective-C, but it was written in Swift. Here's what I've tried so far:
#import <MathParser/MathParser.h>
// ...
// This throws error:
Expression *e;
This doesn't build because the compiler can't find the "Expression" type declared by DDMathParser. I also tried switching my import statement to:
#import <MathParser/MathParser-Swift.h>
But still no luck.
I haven't been able to find any examples online of using this library in Objective-C. I'm new to Objective-C, so I don't even know what import statement to use; maybe other people find this common knowledge?
The Swift version of DDMathParser wasn't written to be usable from Objective-C; it was written to be Swift-like.
If you need to use DDMathParser from Objective-C, I'd recommend using the code at the objc
tag; that's the most recent version of the Objective-C code: https://github.com/davedelong/DDMathParser/releases/tag/objc