I am trying to use ChaiScript in a cocos2d-x project in XCode.
I download the source, add the folder containing the source to my project, and change the header search path for the project to include the folders I think it needs
If I try to build using angle brackets it fails but change it to quotes and it builds
But when I run, I get a runtime error as it can’t find the stdLib moduls
So I am guessing I need to tell it to build that module - but I haven’t a clue how in XCode …
Update: I took the second example from https://github.com/ChaiScript/ChaiScript and got it running for IOS (but running the Mac build fails because it can’t find the hpp files - weird!)
So I can get it to work…
But I can only get it to call global C++ functions not class methods
chaiscript::ChaiScript chai(chaiscript::Std_Lib::library()); chai.add(chaiscript::fun(&test), "test"); double d = chai.eval<double>("test();");
chaiscript::ChaiScript chai(chaiscript::Std_Lib::library()); chai.add(chaiscript::fun(&HelloWorld::test), "test"); double d = chai.eval<double>("test();");
I feel I am sooooo close!
** EDIT - now running on IOS and Mac - but same issue that cannot access class method frowning
** EDIT - works fine with a static class - which kinda makes sense!!!