This process works perfectly when on Windows and running the C# application natively through .NET. But if I attempt to execute the process through Mono I get this error.
'<Module>:_getFiberPtrId ()' in assembly 'CppSharp.Parser.CLI.dll' contains native code that cannot be executed by Mono in modules loaded from byte arrays. The assembly was probably created using C++/CLI.
I get the same error when trying to run the process on Linux which requires Mono to execute the above code.
I assume this is something with my setup, or that I will be required to compile the CppSharp binaries manually for each operating system. Any advice would be appreciated, thank you for your help.
- Chase
To do the above I needed to recompile the CppSharp dlls, making sure to change any references in the VS solution from CppSharp.Parser.CLI to CppSharp.Parser.CSharp.
The pre-build Windows binaries are built against the C++/CLI Parser. This dll is a mixed-mode assembly, which is why only the native .NET is able to run them.
As C++/CLI is only able to be compiled through MSVS, the Linux and Mac versions use the CSharp parser.
CppSharp uses LLVM and Clang, which are native C++ libraries. This is why the project needs compiled for each platform, even though most of CppSharp is written in C#.
I think I will go ahead and see if I'm able to compile and run the CppSharp project using the CSharp parser, I will let you guys know if I have success.
Out of curiosity, as test builds are already being compiled for each platform, is it possible that they may provide the binaries in the future? Or if not, would anyone appreciate if someone like myself build and posted them somewhere?
Just as a confirmation, I was able to compile CppSharp using CppSharp.Parser.CSharp and was able to run in on Windows just fine. This also allowed me to run CppSharp through Mono without issue.
To do the above I needed to recompile the CppSharp dlls, making sure to change any references in the VS solution from CppSharp.Parser.CLI to CppSharp.Parser.CSharp.