Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GoodDay - 11 Jun 2004 12:21 GMT
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??
Gary Chang - 12 Jun 2004 08:18 GMT
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

Signature

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

--------------------
Ronald Laeremans [MSFT] - 14 Jun 2004 19:29 GMT
> 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

> Hi,
>
[quoted text clipped - 29 lines]
> rights.
> --------------------

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.