LNK2022 error


hi all,

we have mixup of managed , unmanaged code. managed code compile using /clr:oldsyntax option. not use packing. want compile files wether managed or unmanaged using /clr:oldsyntax option. when , following errors:

prfinpz4.obj : error lnk2022: metadata operation failed (8013118d) : inconsistent layout information in duplicated types (_devicemodea): (0x020002d7).
wptinpcp.obj : error lnk2022: metadata operation failed (8013118d) : inconsistent layout information in duplicated types (_devicemodea): (0x02000312).
prfinpz3.obj : error lnk2022: metadata operation failed (8013118d) : inconsistent layout information in duplicated types (_devicemodea): (0x020002c8).

i found _devicemodea structure available in widgdi.h file. in none of files have directly included wingdi.h. there way find out header files have included includes wingdi.h?

how can solve above error?

please help..

 

you have use packing of sort.  compiler command line like?  if there -zpn option on command line of files, you've overridden default packing.  also, don't use #pragma pack until after windows includes.

this likley culprit.  have tried running ildasm on object files see sizes of various declarations of _devicemodea?



.NET Framework  >  Common Language Runtime Internals and Architecture



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'