It doesn't seem possible to access global variables in a module in a DLL. Module (in a separate file, to be made as a DLL)
!ftn95$free
MODULE TESTMOD
INTEGER*4 :: QT_NWIN = 99
END MODULE
Main program (separate file, loads previous DLL)
!ftn95$free
program main
USE TESTMOD
SAVE
print*,' QT_NWIN =', QT_NWIN
END
When linking, it says:
WARNING the following symbols are missing:
MODULE TESTMOD
and when I run it, I can see that it has a random value of QT_NWIN.