I'm trying to run my C#/C++ app on Linux after developing it on Windows.
A small part of it, FooLib, is written in C++ which is pinvoked from C# for performance. FooLib uses no system calls, only standard C++ functionality. It exports a single function, declared as:
extern "C" __declspec(dllexport) void Foo(float*, int, float*);
It's compiled with Visual C++. I tried running the app under mono with the windows-compiled FooLib.dll, but the dll loading (DllImport) failed with:
Unhandled Exception: System.DllNotFoundException:Foo(single[2],int,single[])
So, what should I do?
- Change the exporting declaration in some way?
- Compile the thing into a .so library with gcc on Linux, then load that?
- Crosscompile it into a .dll with gcc on Linux, then load that?
- Something else?