BUG: L2025: __fltin with Mixed Language FORTRAN and C (85304)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q85304 SYMPTOMS
When linking code compiled with Microsoft FORTRAN version 5.0 or 5.1 that
uses a READ involving a REAL variable, with code compiled with Microsoft C
version 6.0, 6.0a, 6.0ax, or 7.0 that uses any floating-point operation,
the following error may occur:
llibforx.lib(\mrt\c\cfin.ASM) : error L2025: __fltin :
symbol defined more than once
Under MS-DOS, the resulting executable runs without error. Under Windows
and OS/2, the resulting executable doesn't load due to the error bit in the
executable file's header.
CAUSE
The FORTRAN run-time library contains an object module CFIN.OBJ with two
functions: __fltin and __fltinf. The C run-time library contains the module
CFINN, which only contains the function __fltin. When the C run-time
library must precede the FORTRAN run-time library on the link line, as is
the case when mixing C 6.0 with FORTRAN 5.0, or C 7.0 and FORTRAN 5.1, the
linker initially finds the __fltin function in the C library. When the
linker later needs to resolve the __fltinf function, the entire CFIN module
is included in the executable. This causes the __fltin symbol to be
defined again. The link option /NOE has no effect in situations like this.
RESOLUTION
The L2025 error can be eliminated by removing CFINN.OBJ from the C run-time
library using the library manager LIB.EXE. It is also possible to clear the
error bit in the executable file's header by using the EXEHDR utility with
the /R option. Clearing this bit allows the program to execute correctly
under Windows and OS/2.
STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions
5.0 and 5.1 for MS-DOS and OS/2, and Microsoft C versions 6.0, 6.0a, 6.0ax,
and 7.0.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kberrmsg KB85304 |
---|
|