LNK2022 Error

  • Thread starter Thread starter Mike Dennis
  • Start date Start date
M

Mike Dennis

I'm trying to compile with the /CLR option in VS.NET 2003.

I get the following error :

error LNK2022: metadata operation failed (8013118D) : Inconsistent
layout information in duplicated types (tagYYSTYPE): (0x02000072).

tagYYSTYPE is defined as follows :

union tagYYSTYPE {
char symbol[40];
PickMath::Oper *oper;
PickMath::OpLogical *test;
double value;
};

PickMath is a namespace and Oper and OpLogical are classes within that
namespace. Both Oper and OpLogical contain virtual functions.

Any idea what I need to do to make this work?

Mike Dennis
Divestco Inc.
 
Mike,

Mike Dennis said:
I'm trying to compile with the /CLR option in VS.NET 2003.

I get the following error :

error LNK2022: metadata operation failed (8013118D) : Inconsistent
layout information in duplicated types (tagYYSTYPE): (0x02000072).

tagYYSTYPE is defined as follows :

union tagYYSTYPE {
char symbol[40];
PickMath::Oper *oper;
PickMath::OpLogical *test;
double value;
};
I have never seen this error before. But it seems that the linker fails to
merge the MSIL parts of your object files. Can you see the type
layout of the two types? (Using ildasm with /out on your .obj files)
Any idea what I need to do to make this work?
Maybe it's a managed/unmanaged mismatch? Did you try to use
__nogc/__gc explicitly on the type.

-hg
 
Back
Top