I may just be breaking a Fortran rule, but i have the following problem:
i have a constant declared in a module:
MODULE NMR_CONSTS
INTEGER :: Q_CMP=123
and when NMR_CONSTS is USEd inside our main 'large' DLL it is set correctly but in another 'small' DLL it is zero - but attempting to change it:
IF( Q_CMP.LE.0) Q_CMP=123
causes a memory violation at runtime.
Apparently, the second DLL 'understands' that i'm trying to overwrite a constant (which I assume is why it crashes), but why doesn't the value of the constant survive the call into the second DLL and is there any way of making it do so?
Just to note that the second DLL is different for different end users and i don't want to have to send our 'large' DLL out on a customer-by-customer basis, but I can happily send out the 'small' one...
K