I am using a C++ framework for a c# project and using swig to connect them.
The problem is that TypeInitializationException
is thrown every time when I try to create a C++ object wrapper.
C# code
TRPoint p = new TRPoint();
where TRPoint is a C++ struct
typedef struct {
float x, y;
} TRPoint;
details:
I have a vc project that build the c++ code into DLL file but I don't know how to link it properly.
The exception says "unable to load DLL" - it sounds like you've not built the C++ code that SWIG generates, or possibly got a path issue if it is built.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With