[Mono-list] Need advice about Mono C# + MinGW Fortran
robertj at gmx.net
Sun Mar 4 13:17:29 UTC 2018
On 04.03.2018 02:04, Robert Dodier wrote:
> $ wine gfortran.exe -c fun1.f
> $ wine gfortran -shared -o fun1.dll fun1.o -Wl,--out-implib,libfun1_dll.a
> $ mcs HelloWorld.cs -r:fun1.dll
> error CS0009: Metadata file
> `/home/robert/.wine/drive_c/MinGW/bin/fun1.dll' does not contain valid
> Compilation failed: 1 error(s), 0 warnings
You cannot consume native DLLs like they were .NET assemblies.
Neither with MS.NET nor with Mono, neither under Windows, nor
You may want to look at what "p/invoke" is, and how to leverage it.
But even with p/invoke you won't be able to consume a native Windows
DLL with Mono under Linux, unless you're resorting to Wine & Mono for
Wine (which is just Mono for Windows, IIRC).
More information about the Mono-list