Cannot Combine P-code and Overlays

Last reviewed: July 17, 1997
Article ID: Q87529
7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg

The information in this article applies to:

  • Microsoft C/C++ for MS-DOS, versions 7.0
  • Microsoft Visual C++ for Windows, versions 1.0 and 1.5

SUMMARY

It is not possible to create an overlaid MS-DOS program from code that has been compiled into p-code.

MORE INFORMATION

Attempting to create an overlaid MS-DOS program from object modules that have been compiled into p-code will cause the linker to generate the following warning message:

   LINK : warning L4013: Overlays : option ignored for
          segmented-executable file

LINK versions 5.3 and 5.31.009 supplied with Microsoft C/C++ version 7.0 then generates L2029 "unresolved external" error messages for the following symbols:

   $$COVL
   $$OVLTHUNKEND
   $$MPOVLSIZE
   $$MPOVLLFA
   $$INTNO
   $$MPGSNOVL
   $$MPGSNBASE
   $$OVLTHUNKBEG
   $$CGSN

LINK versions 5.5 and 5.6 supplied with Microsoft Visual C/C++ generate the L4013 warning but do not generate the L2029 errors.

The linker generates the L4013 warning because compiling with the /Oq option and linking with the /PCODE option causes the linker to create a segmented executable file. MS-DOS executables are normally non-segmented. However, the Make P-code utility (MPC), which must be run on a p-code executable to make it runnable, requires a segmented executable. It is not currently possible to specify overlays for a segmented executable. This limitation applies to using both static overlays as well as the Microsoft Overlay Virtual Environment (MOVE). The symbols that are listed as unresolved externals are being referenced by the MOVE routines in the medium and large memory model run-time libraries. These symbols are ordinarily resolved by the overlay manager. However, because the overlay manager is not linked in by the linker, these symbols are not defined.

Most of these errors also occur when specifying /OLDOVERLAY and using the parenthetical notation to specify the old static overlays. Specifically, L2029, "unresolved external" errors occur for the following symbols:

   $$OVLBASE
   $$EXENAM
   $$MPOVLLFA
   $$INTNO
   $$MPGSNOVL
   $$MPGSNBASE


Additional reference words: kbinf 1.00 1.50 7.00 5.30 5.50 5.60 packed
pcode
KBCategory: kbprg
KBSubcategory: MoveOverlay StaticOverlay
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.