FIX: MPC MP4007 Warning Possible Causes

ID: Q90323

7.00 MS-DOS kbtool kbfixlist kbbuglist

The information in this article applies to:

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

Last Reviewed: September 17, 1997