LNK2022 Error

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.
 
H

Holger Grund

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top