See the question and my original answer on StackOverflow

P/Invoke has a lot of adaptation capabilities. Also P/Invoke is cross platform (with .NET Core).

However, it's not binary compatible with C/C++, but if a piece of C/C++ code can be used by P/Invoke, it's not dependent on the C/C++ compiler (MSVC or other), or said in another way, it will not be able to use any C++ construct, but it will see all C++ compilers as equal citizens