B
Bret Pehrson
I've converted a non-trivial C++ library to managed, and get the following
unhelpful linker error:
Assignment.obj : error LNK2022: metadata operation failed (80131195) : Custom
attributes are not consistent: (0x0c0001a5).
Display.obj : error LNK2022: metadata operation failed (80131195) : Custom
attributes are not consistent: (0x0c000108).
The help for LNK2022 is completely useless:
metadata operation failed (HRESULT) : error_message
The linker detected an error while merging metadata. The metadata errors must
be resolved to link successfully.
One reason for LNK2022 is when a struct exists in multiple modules with the
same name, but with conflicting definitions, and when you compile with /clr.
<<
A search for "Custom attributes are not consistent" at MS turns up *NO*
results, and google/google groups only returns a few -- none of which really
discuss the problem or it (eventual?) solution.
In this case, I've looked over the source file, and there are no mystery
structs floating around, although my searches are far from definitive as the
project is composed of hundreds of inter-related files/headers.
Has *ANYONE* figured out or would MS care to elaborate on what the "Custom
attributes are not consistent" error means and what the final hex number
means? Apparently it has some dynamic value, as similar errors have different
values.
unhelpful linker error:
Assignment.obj : error LNK2022: metadata operation failed (80131195) : Custom
attributes are not consistent: (0x0c0001a5).
Display.obj : error LNK2022: metadata operation failed (80131195) : Custom
attributes are not consistent: (0x0c000108).
The help for LNK2022 is completely useless:
metadata operation failed (HRESULT) : error_message
The linker detected an error while merging metadata. The metadata errors must
be resolved to link successfully.
One reason for LNK2022 is when a struct exists in multiple modules with the
same name, but with conflicting definitions, and when you compile with /clr.
<<
A search for "Custom attributes are not consistent" at MS turns up *NO*
results, and google/google groups only returns a few -- none of which really
discuss the problem or it (eventual?) solution.
In this case, I've looked over the source file, and there are no mystery
structs floating around, although my searches are far from definitive as the
project is composed of hundreds of inter-related files/headers.
Has *ANYONE* figured out or would MS care to elaborate on what the "Custom
attributes are not consistent" error means and what the final hex number
means? Apparently it has some dynamic value, as similar errors have different
values.