PRB: Linker Generates L2048 for Overlaid Programs
ID: Q112343
|
The information in this article applies to:
-
Microsoft FORTRAN for MS-DOS, versions 5.0, 5.1
SYMPTOMS
LINK.EXE versions 5.3 and later provided with Microsoft C/C++ products
support both the dynamic MOVE style overlays and the old method that uses
the Static Overlay Manager. FORTRAN customers who attempt to link overlaid
programs using these versions of the linker may encounter the following
errors:
LINK : error L2048: Microsoft Overlay Manager module not found
LINK : warning L4038: program has no starting address
CAUSE
The linker versions 5.3x and later support MOVE overlays by default. The
MOVE overlay support code is not present in the FORTRAN run-time library,
and therefore these errors are generated.
RESOLUTION
There are three ways to resolve this problem:
- Use the version of LINK that is provided with the FORTRAN compiler.
-or-
- Use the /OLDOVERLAY (or just /OLD) with these versions of LINK to allow
the linker to correctly link using the Static Overlay Manager. The
resulting program cannot be debugged because CodeView 4.x cannot debug
statically linked programs, and CodeView 4.x must be used to debug
applications linked with linker version 5.3x or later.
-or-
- Use the MOVE overlay technology provided with the Microsoft C/C++
products. The C/C++ MS-DOS run-time library must be linked to the
FORTRAN object modules because the MOVE Overlay Manager code is not
provided with the FORTRAN run-time library. The resulting code can be
debugged using CodeView 4.x. However, because CodeView 4.x does not have
a FORTRAN expression evaluator, some of the CodeView functionality is
limited. The preferred way of specifying MOVE overlays is via a module
definition file; however, the parenthesis syntax of static overlays is
also supported.
MORE INFORMATION
The following code samples and the makefile demonstrate how to use MOVE
overlays with FORTRAN modules:
Sample Code #1
A.FOR
print*, 'in root'
call b
stop 'terminating in root'
end
Sample Code #2
B.FOR
subroutine b
print*, 'in b'
call c
return
end
Sample Code #3
C.FOR
subroutine c
print*, 'in c'
return
end
Sample Code #4
MAKEFILE
all: a.exe
.for.obj:
fl /c /Zi /Od $<
a.exe: a.obj b.obj c.obj
link a (b) (c) /CO /NOD /NOE,,nul,llibc7 llibfor7;
Additional query words:
nofps Visual 1.00 1.50 5.31.009 5.50 5.60
Keywords :
Version : :5.0,5.1
Platform :
Issue type :