Cannot WRITE to window created with AllocConsole

Published: 12/22/2011, Last Updated: 12/22/2011

Reference Number : DPD200110270

Version : 11.0

Operating System : Windows



Problem Description

If a non-console application ("Windows Application" or other that does not create a console window automatically) calls the Win32 API routine AllocConsole to create a console, a Fortran WRITE to the "console" will fail with:

forrtl: severe(38): error during write, unit -1, file CONOUT$

The unit number may vary.

This is a change in behavior from previous versions where such writes succeeded.

Resolution Status

This problem is corrected as of version 11.0.072 of Intel Visual Fortran. A workaround is to write to unit 0 instead of unit * or 6. If you are seeing a similar issue with a later version of the compiler, please contact Intel Support.


[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]


Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804