[Mono-list] Need advice about Mono C# + MinGW Fortran
robert.dodier at gmail.com
Mon Mar 5 06:45:03 UTC 2018
On Sun, Mar 4, 2018 at 5:17 AM, Robert Jordan <robertj at gmx.net> wrote:
> 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
> under Linux.
Well, my larger goal is to be able to call a Fortran function from C#.
It's not important to me to use native DLLs or any other specific approach.
Can you suggest an approach which can lead toward the goal?
I have been reading about p/invoke but I haven't been able to devise
a solution based on that; if you have any hints that would be great.
Thanks for your help,
More information about the Mono-list