Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 958 Bytes

linker-tools-error-lnk1179.md

File metadata and controls

32 lines (24 loc) · 958 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Linker Tools Error LNK1179
Linker Tools Error LNK1179
11/04/2016
LNK1179
LNK1179
4b1536d7-0d3d-4f29-a9c1-6fa5cf6cb665

Linker Tools Error LNK1179

invalid or corrupt file: duplicate COMDAT 'filename'

An object module contains two or more COMDATs with the same name.

This error can be caused by using /H, which limits the length of external names, and /Gy, which packages functions in COMDATs.

Example

In the following code, function1 and function2 are identical in the first eight characters. Compiling with /Gy and /H8 produces a link error.

void function1(void);
void function2(void);

int main() {
    function1();
    function2();
}

void function1(void) {}
void function2(void) {}