The information in this article applies to:
SYMPTOMSAn attempt to run, in MS-DOS, an application generated by Microsoft FORTRAN version 5.1, fails and generates the following message: If the application is run in Windows, the system may open an MS-DOS session, display the message above and close the MS-DOS session, returning to Windows without running the application. CAUSEMost likely, one of the following errors occurred linking the application:
When one of these errors occurs, Microsoft LINK sets an error bit in the executable file header. The error bit warns the application loader that the file contains an error. In Windows, this bit causes the loader to start an MS-DOS session for the application. If the application is designed for Windows, the MS-DOS correctly displays the error message above. If an L2025 or L2029 error occurs creating an application for the MS-DOS operating system, the loader does not reject the application. However, in the MS-DOS operating system, running an application that has unresolved externals may generate incorrect results or cause the system to hang. In the OS/2 operating system, the application generates a general protection (GP) fault if it attempts to access a restricted memory location. RESOLUTIONThe best method to address this situation involves resolving the LINK error at its source. If this is not possible or undesirable, use the EXEHDR utility to manually reset the error bit. The syntax to call the EXEHDR utility is as follows: EXEHDR /r <filename> STATUSVersions 3.0 and 3.1 of the Windows loader each interpret the error bit as described above. MORE INFORMATIONThe following FORTRAN code reproduces the problem: Sample CodeThis is the source code for the SAMPLE.FOR file:
Project MakefileALL : Sample.EXE
Additional query words: 5.01.20 5.01.21 5.02 5.03 5.05 5.10 5.11 5.13 5.15 5.20 5.30 5.31.009 5.50
Keywords : kb16bitonly |
Last Reviewed: October 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |