I have a main fortran program that calls a fortran dll. The main program and the dll share the same common blocks. DLLIMPORT declaration is used in the main program and DLLEXPORT is used in dll for these common blocks. However, in the debug mode with a break point in the main program , the watch window listing the variables for these common blocks shows undefined values. I added write statement to main program for these variables and it returns the proper values.
Why does the watch window show an undefined value when the write statement show a proper value? Can the watch window be set up to show the proper value of the variables defined in the common block when debugging the main program?