469,951 Members | 2,721 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,951 developers. It's quick & easy.

What this message means "LNK2022: metadata operation failed" ?

MC++ application, I've got "LNK2022 error message...

MyApp error LNK2022: metadata operation failed (8013118D) : Inconsistent method declarations in duplicated types(CMainFramel). (0x02000008).

It seems to be some my struct type have a "#pragma pack (push, 1)".
Delete that #pragma keywords. Solve the LNK2022 problem.
But why? That "#pragma ..." line make the problem and what's the meaning of two value (8013118D, 0x02000008).
It seem to be varibale for appliation and code... What's is this meaning for??

Nov 17 '05 #1
2 4957
Hi,
what's the meaning of two value (8013118D, 0x02000008).


metadata operation failed (HRESULT) : error_message
The 8013118D is the HRESULT, the 0x02000008 is the RVA of the type in the
error message.
"According to the MSDN,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.

This usually happens because somehow the compiler puts slightly different
metadata in two modules for the same type. At link time, when the metadata
is merged, this error is emitted because the name for the type is the same,
but there is some descrepancy in the rest of the metadata describing that
type."

In your scenarion, it appears the problematic type has the conflict
alignment.
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Nov 17 '05 #2
> 0x02000008 is the RVA of the type in the error message.

More specifically, it is the token ID of the metadata token referring to the
definition. You can use ildasm to see what type it rfers to.

Ronald Laeremans
Visual C++ team

"Gary Chang" <v-******@online.microsoft.com> wrote in message
news:uW**************@TK2MSFTNGP12.phx.gbl...
Hi,
what's the meaning of two value (8013118D, 0x02000008).


metadata operation failed (HRESULT) : error_message
The 8013118D is the HRESULT, the 0x02000008 is the RVA of the type in the
error message.
"According to the MSDN,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.

This usually happens because somehow the compiler puts slightly different
metadata in two modules for the same type. At link time, when the metadata
is merged, this error is emitted because the name for the type is the
same,
but there is some descrepancy in the rest of the metadata describing that
type."

In your scenarion, it appears the problematic type has the conflict
alignment.
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Gilles Arnaud | last post: by
3 posts views Thread by Giulio | last post: by
1 post views Thread by =?Utf-8?B?c3DDr3LDtg==?= | last post: by
reply views Thread by sa6113 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.