Linker Tools Error LNK1179
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

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.

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() {

void function1(void) {}
void function2(void) {}
© 2016 Microsoft