FIX: L2057 Linking Code Compiled with /Gy into MOVE App

ID: Q87528

5.30 | 5.30 MS-DOS | WINDOWS

The information in this article applies to:

SYMPTOMS

An attempt to link an application fails and Microsoft LINK generates the following message:

   error L2057: duplicate of "function" with different size found;
                record ignored

CAUSE

The application was built using Microsoft C/C++ version 7.0, the compiler options include /Gy, and the program uses the Microsoft Overlaid Virtual Environment (MOVE).

RESOLUTION

To work around this problem, perform one of the following three steps:

STATUS

Microsoft has confirmed this to be a problem in LINK version 5.3 for MS-DOS (distributed with C/C++ version 7.0). This problem was corrected in LINK version 5.31.009 for MS-DOS (distributed with the C/C++ version 7.0a patch disk).

MORE INFORMATION

The /Gy option instructs the compiler to package the function and make it visible to the linker with a COMDAT record. When the error occurs, the function that detects segment overflow counts the continuation blocks for a given COMDAT record twice when it should count them once. The L2057 error occurs when the COMDAT record is at the end of a segment.

Additional reference words: 5.30 KBCategory: KBSubcategory: LinkIss

Keywords          : kberrmsg kb16bitonly LinkIss 
Version           : 5.30 | 5.30
Platform          : MS-DOS WINDOWS
Issue type        : kbbug
Solution Type     : kbfix

Last Reviewed: May 22, 1998