FIX: Linker May Cause L5000 with CodeView Information

Last reviewed: September 16, 1997
Article ID: Q102920
5.50 5.60 5.60.220 5.60.339 MS-DOS kbtool kberrmsg kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft Link for MS-DOS, version 5.5 and 5.6

SYMPTOMS

Linking a large number of object modules and libraries with the /CO option for CodeView information may generate the following error message:

   LINK : fatal error L5000:

CAUSE

This problem is typically caused when the linker, LINK.EXE, gets to the CodeView information packing stage while generating a large .EXE file.

RESOLUTION

Use one or more of the following to work around this problem:

  • Link without the /CO option if the application doesn't need to be debugged.
  • Link with the /CO:NOCVPACK option to create an .EXE file with unpacked CodeView information, and then run CVPACK.EXE separately on the .EXE. The CVPACK.EXE utility in the \MSVC\BIN directory by default. For more information about CVPACK, select the "Tech Notes" icon in your Visual C++ Program Manager group. You'll see a help button that reads "Using CVPACK."
  • Reduce the amount of CodeView information for the application by compiling only the essential modules with the /Zi option; compile the rest with the /Zd option.
  • Avoid linking OLDNAMES.LIB last.
  • If using the /LI linker option, remove it.
  • Assign the TMP environment variable a valid hard drive and directory with a large amount of disk space (preferably not a RAM drive).

STATUS

Microsoft has confirmed this to be a problem in the versions of the linker given at the beginning of this article. Some causes of this problem have been fixed in Visual C++ 1.52, but in some instances, you may still need to use /CO:NOCVPACK and then use cvpack on the exe. For more information, please refer to kb article Q127151.


Additional reference words: 5.50 5.60 5.60.220 5.60.339 /CO:N visualc
KBCategory: kbtool kberrmsg kbfixlist kbbuglist
KBSubCategory: LinkIss
Keywords : kb16bitonly
Solution Type : kbfix


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: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.