468,168 Members | 1,509 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

VC++ 2005 1 byte Alignment

Hi,

I have created a mfc extension dll in VS2005. In code generation I set the
Alignemnt to 1Byte and compile. This works fine.
Now I add clr support to my dll and i get errors when linking.
error LNK2022: metadata operation failed
(8013118D) : Inconsistent layout information in duplicated types
(tagTEXTMETRICA): (0x02000029)Any idea if I need to change project setting
for a MFC Extension Dll using Clr?Thanks,Asfar
Apr 6 '07 #1
1 1478

"Asfar" <as**********@cashmgmt.comwrote in message
news:uq**************@TK2MSFTNGP04.phx.gbl...
Hi,

I have created a mfc extension dll in VS2005. In code generation I set
the Alignemnt to 1Byte and compile. This works fine.
No, it compiles fine. There's a difference :)
Now I add clr support to my dll and i get errors when linking.
error LNK2022: metadata operation failed
(8013118D) : Inconsistent layout information in duplicated types
(tagTEXTMETRICA): (0x02000029)Any idea if I need to change project setting
for a MFC Extension Dll using Clr?Thanks,Asfar
You should not change structure packing globally, only for your own data
types. The managed compiler "knows" the correct packing for system types
and throws an error where the native compiler didn't. It's a real bug you
need to fix. Use "#pragma pack" to set packing, and do it selectively,
don't set the project property (at least not for files that call into the
Win32 API).
Apr 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Marco | last post: by
4 posts views Thread by Shashi | last post: by
11 posts views Thread by Taran | last post: by
12 posts views Thread by Olaf Baeyens | last post: by
12 posts views Thread by Chris Stankevitz | last post: by
5 posts views Thread by AliR | last post: by
20 posts views Thread by quantumred | last post: by
3 posts views Thread by =?Utf-8?B?RGlwZXNoX1NoYXJtYQ==?= | last post: by
19 posts views Thread by glchin | last post: by
1 post views Thread by gcdp | last post: by
reply views Thread by kamranasdasdas | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.