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
  • Which scripting language is it, specifically? Commented Nov 18, 2012 at 21:37
  • Is it acceptable to compile within Visual Studio, but also run on Mono+WINE? Commented Nov 18, 2012 at 21:41
  • @SimpleCoder it won't make any difference telling you, the focus is on C++. No offense. Commented Nov 18, 2012 at 21:57
  • @BenVoigt No, unfortunately that would not be acceptable. Commented Nov 18, 2012 at 21:57

1 Answer 1

1

You'll probably have to rewrite parts of the scripting engine to use .NET Reflection to look up names and call functions. You might find it easier to use one of the .NET scripting solutions, but even if not, the Dynamic Language Runtime will be useful in integrating your scripting engine with the .NET types it should provide access to.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.