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
metadata
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
under Linux.

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).

Robert
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.dot.net/mailman/listinfo/mono-list

Reply via email to