1

I'm currently trying to expose a scripting language (similar to Forth, but not quite) written in C++, to C# and vice versa. Exposing C++ to C# is not difficult, and I already know how to do that.

However, I also want to expose .Net classes to the scripting language, as in, access those classes within C++. I would like to keep the code crossplatform, so a method that makes it possible to use it with Mono would be greatly preferred.

A quick google search sort-of implied that this can only be achieved by using Visual Studio, but I'm sure that there has got to be a different way to achieve this?

My apologies if this question is not well-formed.

4

1 回答 1

1

您可能必须重写部分脚本引擎以使用 .NET 反射来查找名称和调用函数。您可能会发现使用其中一种 .NET 脚本解决方案更容易,但即使不是这样,动态语言运行时也将有助于将您的脚本引擎与它应该提供访问权限的 .NET 类型集成在一起。

于 2012-11-18T21:40:34.803 回答