I need to make a large c++ library avaiable for use in .Net languages such as C#.
The library contains a large number of classes which can be broken into two groups. Refrence counted classes, which implement the IRefCounted abstract class and use a factory method to create them, and just plain classes using new/delete.
In adittion there are many plain functions.
Origenannly I was just going to write wrapper classes for everything in c++/clr. However it is desired that the resulting wrapper libraries will work on Mono. Recompiling the library and the wrapper to target each platform is fine, however the problem is that it seems that c++/clr can only target windows as there is no compiler for it to target other platforms and thus the wrapper code wont work on other patforms...
Is there somthing I missed here (like a howto run c++/clr on x platform guide) or is there an alterative way to make all the c++ functions, structs and classes avaible to C#?
EDIT: By avaible I mean avaible to use eg say in my c++ lib I had
//namespace maths{
class Vector2
{
public:
float x,y;
Vector2();
Vector2(const Vector&);
Vector2(float x, float y);
float Dot();
//operators
...
};
Then in C# id like to be able to use it like a normal class eg
maths::Vector2 a = new maths::Vector2(5, 5);
maths::Vector2 b = new maths::Vector2(1, 10);
b *= 3
maths::Vector2 c = a + b;
//c.x == 8, c.y == 35
Also however I do it I cant edit the c++ library, anything must be done as a wrapper around the existing classes and functions.