On Windows, you can use COM interoperability to work with C ++. However, this will not work on Linux / Mac OS X.
Another alternative is to publish the C shell around the C ++ class (extern "C" in C ++). This is necessary because DllImport expects a C ABI.
Edit: and the third option is C ++ / CLI , i.e. compile your C ++ code for .Net. It is also a solution for Windows.
source
share