FIX: MPC MP4007 Warning Possible Causes

Last reviewed: September 16, 1997
Article ID: Q90323
7.00 MS-DOS kbtool kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft C/C++ for MS-DOS and Windows, version 7.0

SYMPTOMS

When building an application with Microsoft C/C++ version 7.0, the Make p- code utility, MPC, may issue the following warning:

   MP4007: MAP file parse failed at line <no.> in file <filename>

The map file is not corrupt, but the warning goes away after the map file is deleted.

CAUSE

When linking a p-code application, the linker creates a segmented executable file (.EXE extension) and a segmented map file (.MAP file). Part of what the MPC utility does is convert the segmented map file to a non- segmented map file. Therefore, MPC expects to see a segmented map file.

If a non-segmented map file exists and the linker is not asked to generate a new map file, MPC will try to convert the existing non-segmented map file and will issue the MP4007 warning. This situation can be reproduced with the following steps:

   cl /Oq /Fm hello.c     (map file produced and converted)
   cl /Oq hello.c         (MP4007 error with existing map file)

This warning can also occur if the executable is built in the following manner:

   cl /c /Oq hello.c
   link /PCODE hello,,hello;

In this case, a segmented map file is created, but it will not contain the list of public symbols. The MPC utility does not accept such a map file, and issues the MP4007 warning. Linking with

   link /PCODE hello,,hello /MAP;

will place the symbols in the map file, and the warning will not be generated.

RESOLUTION

This is just a warning and does not indicate problems with the executable file. To avoid the warning, delete the nonsegmented map file or regenerate the map file every time the executable is linked, making sure that the symbols are included by linking with the /MAP option.

It has been suggested that future versions of MPC ignore nonsegmented map files and accept segmented map files that do not contain the list of public symbols.

STATUS

Microsoft has confirmed this to be a problem with C/C++ version 7.0. This problem was corrected in Visual C++ version 1.0.


Additional reference words: 7.00
KBCategory: kbtool kbfixlist kbbuglist
KBSubcategory: TlsMisc
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.