Skip to main content
gamedev.net
🔒 Locked

D3DXMATRIX

Started by Ksingh30 5 replies 1k views
Original Post
Ksingh30
Ksingh30
ok I have this class called Terrain, and in the private part of this class im declaring "D3DXMATRIX World[5];" but im getting weird errors. error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (Terrain): (0x02000050). LINK : fatal error LNK1255: link failed because of metadata errors
Muhammad Haggag
Muhammad Haggag
This is what the MSDN has to say about the error:
Quote:
metadata operation failed (HRESULT) : error_message

The linker detected an error while merging metadata. The metadata errors must be resolved to link successfully.

One reason for LNK2022 is when a struct exists in multiple modules with the same name, but with conflicting definitions, and when you compile with /clr.


Are you somehow re-defining a structure? Can you post the code (in source tags, see GDNet Forums FAQ)?

Ksingh30
Ksingh30
nope. im not redefining anything. it was working fine, and then next time I open it its giving me this error.
Ksingh30
Ksingh30
ya I dont get it the only extra thing I added was
D3DXMATRIX world;
and I even took that out but it just doesnt work anymore.
Muhammad Haggag
Muhammad Haggag
If it doesn't work out anymore even without that line, it's clearly not the fault of the line. Some files were probably corrupted. Delete all intermediate files and try again. If that doesn't work, then you either have something multiply defined (as noted above) or you've hit some compiler/linker bug.

Armadon
Armadon
Just do add what Coder has said.
It would seem that the problem might occur if you have corrupt headers or .obj files. What you could do is open a new solution and just transfer your headers etc.. to the new solution. This might solve the problem. Also if you have converted from VS2002 to VS2003 or any situation of that matter it might cause the issue aswell..

I hope this helps.
Take care.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.