PRB: L2029: Unresolved External _main in crt0.asm (49526)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 4.1
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN PowerStation for MS-DOS 1.0
- Microsoft FORTRAN PowerStation for MS-DOS 1.0a
- Microsoft Fortran Powerstation 32 for Windows NT 1.0
- Microsoft Fortran Powerstation 32 for Windows NT 4.0
- Microsoft FORTRAN compiler for OS/2 4.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q49526 SYMPTOMS
An attempt to link an application fails and Microsoft LINK generates the
following message:
(dos\crt0.asm) : error L2029: '_main' unresolved external
libc.lib(CRT0.OBJ) : warning LNK4516: unresolved external symbol "_main"
error LNK2120: 1 Undefined Externals
libc.lib(CRT0.OBJ) : warning LNK4016: unresolved external symbol "_main"
error LNK1120: 1 unresolved externals
For FORTRAN PowerStation 32, version 4.0:
error FOR1768: missing END statement or missing program unit
(possibly free-form source in fixed-form file)
CAUSE
The compiler or the linker cannot determine the entry point for the
program.
RESOLUTION
To address this problem, perform one of the following three steps:
- Verify that the lines of the FORTRAN source code begin in column
seven and that the program has an END statement.
- Specify the /4Yf compiler option switch to enable free-form
source code.
- Verify that the source file containing the main program is being
compiled and linked in.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kberrmsg kbLangFortran KB49526 |
---|
|