PRB: L2029 "Unresolved External" Errors Linking FORTRAN App (31577)



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 4.0
  • Microsoft FORTRAN Compiler for MS-DOS 4.01
  • 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 compiler for OS/2 4.1
  • Microsoft FORTRAN compiler for OS/2 5.0
  • Microsoft FORTRAN compiler for OS/2 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS 1.0
  • Microsoft FORTRAN PowerStation for MS-DOS 1.0a

This article was previously published under Q31577

SYMPTOMS

During the process of linking an application, the linker generates a number of error messages of the following form:
error L2029: '_name' unresolved external

CAUSE

There are three main causes for this error:

  • The FORTRAN libraries were built with C compatibility support and the C libraries are not linked with the application. The C- compatible FORTRAN libraries do not contain the routines common to both C and FORTRAN. -or-

  • The version of the linker is not correct. -or-

  • A terminate-and-stay-resident (TSR) program interferes with the linking process.

RESOLUTION

The corresponding resolutions are as follows:

  • Link the application with both the C libraries and FORTRAN libraries.
  • Ensure that the latest version of the linker is installed.
  • Modify the AUTOEXEC.BAT file to remove all unnecessary TSR programs.

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:KB31577