I use the C ++ framework for a C # project and using swig to connect them.
The problem is that a TypeInitializationException is thrown every time I try to create a wrapper on a C ++ object.
C # code
TRPoint p = new TRPoint();
where TRPoint is a C ++ structure
typedef struct { float x, y; } TRPoint;

Details:

I have a vc project that builds C ++ code in a DLL file, but I do not know how to properly link it.
source share