I have windows (winmain) application I build in Intel Fortran. I recently set up a build in gfortran which works OK but I have a strange problem. The application in the initialisation phase opens (via create process) a console window and configures it ( size, location, title, icon, colour scheme, buffer size etc…) . The console is attached to the application using the windows api AttachConsole function. This console is used for informational output only. The main application thread is a (GDI) window with menus etc which can also have OpenGL child windows, modal and modeless dialogs etc etc.
Anyway every time I open a file with a Fortran OPEN statement the program appears to hang. What I find is that I have to click on the console window and hit enter. The file open then happens correctly without any error status. It is like it wanted to pop some invisible console message and I need “enter to continue”. Has anybody got any ideas what causes this of how to investigate the root cause? I am guessing it is some feature or quirk of the gfortran runtime system.