Consider the following trivially simple program:
PROGRAM t
USE numbers
IMPLICIT NONE
CALL init_numbers ()
WRITE(*,*) dp,e
END PROGRAM t
This program uses the following module:
MODULE numbers
IMPLICIT NONE
INTEGER, PARAMETER, PUBLIC :: dp=KIND(1.0d0)
REAL(KIND=dp), PARAMETER, PUBLIC :: one=1.0_dp
REAL(KIND=dp), PUBLIC :: e
CONTAINS
SUBROUTINE init_numbers ()
e=one
RETURN
END SUBROUTINE init_numbers
END MODULE numbers
If I create the module as a DLL, the following message is issued at compilation even though the DLL is specified as a reference:
WARNING the following symbols are missing: MODULE NUMBERS .\CheckMate\Win32\t.obj
At runtime, the output is correct for dp, but nonsense for e.
Please advise what I am doing wrong.