Topic: Fortran from Excel

Your blogs 4 and 5 describe how to call Fortran from Excel via Visual Basic. To me, a novice, there seem to be gaps in these. These are old blogs However, I’ve got to these routines to average to numbers, which compile ok.

MEAN.FOR as follows:

Module MEAN_MODULE
    USE ISO_C_BINDING
    IMPLICIT NONE
CONTAINS
   FUNCTION MEAN(A,B) BIND(C, name=“mean”) RESULT (M)
      REAL(C_DOUBLE), VALUE :: A, B
      REAL(C_DOUBLE) M
      M = (A + B)/2.
   END FUNCTION
END MODULE


MEAN.DEF as follows:

LIBRARY MEAN
EXPORTS
   MEAN=“MEAN@16”

This gets … Generating Makefile Okay
But then ….  ld returned 1 exit status
               Last command making (target.exe) returned in bad status.

Any clue as to what I am missing, please.