Fortran DLL and D

Ellery Newcomer ellery-newcomer at utulsa.edu
Wed Mar 14 06:34:57 PDT 2012


On 03/13/2012 05:15 PM, Michael wrote:
> Hi everyone)
>
> dmd 2.058
> os: win 7 64 bit
> fortran compilers: gfortran, ftn95
>

Here's apples to oranges, since I'm on linux 64 bit, but with your code 
and this:

pragma(lib, "flib");

extern(C) void fsu_(int*i);

void main(){
     int i = 1;
     fsu_(&i);
}

when compiled on my box gives

  The answer is x =   2.50000004E-02           1

If something similar doesn't work for you, can you post disassembly 
dumps of your dll function and calling function?


More information about the Digitalmars-d mailing list