I've created compiled and executed Fortran 77 code, and then created a .dll file - using g77, for calling as external function in MAPLE 18. I have received the following : Error loading external library. Details are below. Can anyone explain what is going wrong?

Below is the history the steps I have taken:

Here is the contenct of my FORTAN source code file: test2.for

PROGRAM MAIN

REAL x,y, mult

x = 4.0

y = 3.0

OUT = mult(y,x)

WRITE(UNIT=*,FMT=11) OUT,x,y

11 FORMAT(1X,3E12.4)

END

function mult( a, b )

REAL a,b, mult

mult = a*b

END

The compile, execute and shared library creation steps are as follows (using g77):

g77 -v -Wall -c -malign-double test2.for

g77 -v "test2.for" -o "test2"

..execution ran successfully. Creation of dll:

g77 -s -o "test2.dll" "test2.for"

...this executed successfully

Defining as external function in MAPLE:

fmult := define_external('mult', LIB = "S:/MRBwork/IT/Fortran/projects/MAPLE - Fortran/CERN primes/test2.dll", FORTRAN, 'a'::(float[4]), 'b'::(float[4]), RETURN::(float[4]))

... but received following error.

Error, external linking: error loading external library S:/MRBwork/IT/Fortran/projects/MAPLE - Fortran/CERN primes/test2.dll: @�b%

Can someone take and look at the above and explain what may be causing the erroo ion the loading the .dll file?

Melvin