error LNK2022: metadata operation failed

  • Thread starter Thread starter Laurent Lequenne
  • Start date Start date
L

Laurent Lequenne

Hello There,

I just converted a VS 2003 C++ Project into VS 2005. I already made some
changes in my headers files, has I had compilations errors with enums
declarations. Now everything compiles and I got errors at the link as shown
below. If anyone could help me to get that thing compiled, he's welcome
:-)))

Thanks,

Laurent


MSVCMRT.lib(mstartup.obj) : error LNK2022: metadata operation failed
(8013118D) : Inconsistent layout information in duplicated types
(tagTEXTMETRICA): (0x02000039).
MSVCMRT.lib(managdeh.obj) : error LNK2022: metadata operation failed
(8013118D) : Inconsistent layout information in duplicated types
(tagTEXTMETRICA): (0x02000029).
MSVCMRT.lib(mehvecdtr.obj) : error LNK2022: metadata operation failed
(8013118D) : Inconsistent layout information in duplicated types
(tagTEXTMETRICA): (0x0200002a).
MSVCMRT.lib(msilexit.obj) : error LNK2022: metadata operation failed
(8013118D) : Inconsistent layout information in duplicated types
(tagTEXTMETRICA): (0x0200002c).
MSVCMRT.lib(puremsilcode.obj) : error LNK2022: metadata operation failed
(8013118D) : Inconsistent layout information in duplicated types
(tagTEXTMETRICA): (0x02000029).
 
Laurent Lequenne said:
I just converted a VS 2003 C++ Project into VS 2005. I already made some
changes in my headers files, has I had compilations errors with enums
declarations. Now everything compiles and I got errors at the link as
shown
below. If anyone could help me to get that thing compiled, he's welcome
:-)))
Someone else run into the issue before. You might want to read through
this thread:

news://news.microsoft.com/[email protected]

or

http://groups.google.de/group/micro...99bdf0b4936/af5951e0c5fd06f0#af5951e0c5fd06f0

Anyway, it's like a packing mismatch. You should not use the /Zp or pragma
pack unless
you absolutely have to.

That being said, I consider that an issue with the Microsoft tool chain,
too. There are
many structures that add additional members when new versions of the product
add
features. The API typically has the appropriate safe guards and the linker
shouldn't
choke on it.

-hg
 
Back
Top