Custom attributes are not consistent?

T

Tamas Demjen

I started to experiment with VC++ 2005 Beta1. So far everything went
fine, and already have a working project, but soon I realized that the
compiler was ancient (not supporting half of the C++/CLI standard). So I
downloaded the VC++ 2005 Tools Refresh (http://tinyurl.com/5mdq2). After
that I tried to do a full rebuild, but my project wouldn't link anymore.
I get the following errors:

MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000002).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000005).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000008).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c00000a).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c00000d).
[... lots of errors ...]

I did a quick reality check:
ildasm "C:\Program Files\Microsoft Visual Studio 8\VC\lib\MSVCMRTD.lib"
/text /out=output.txt

Searching for those hex atrribute codes from the error messages I could
find some actual references, but I'm completely clueless about them.
It's not something that I can read:

// TypeDef #1 (02000002)
// -------------------------------------------------------
// TypDefName: _EXCEPTION_DISPOSITION (02000002)
// Flags : [NotPublic] [AutoLayout] [Class] [Sealed] [AnsiClass]
(00000100)
// Extends : 01000006 [TypeRef] System.Enum
// CustomAttribute #2 (0c000002)
// -------------------------------------------------------
// CustomAttribute Type: 0a000002
// CustomAttributeName: Microsoft.VisualC.NativeEnumAttribute ::
instance void .ctor()
// Length: 4
// Value : 01 00 00 00 >
<
// ctor args: ()

This mstartup.obj file is not even mine, whatever errors it may have,
they're not related to my code. Besides, the entire project linked
perfectly prior to updating to the VC++ 2004 Tools Refresh. I understand
that it's still a beta product, but what am I doing wrong? I'll keep
trying with much simpler projects, because a trivial empty-form
application links fine.

Thanks,
Tom
 
T

Tamas Demjen

Silly me, I mistakenly installed the old Tools Update
(vcpp_40809_install.exe) from August. After downloading and installing
the latest one from the Microsoft site, everything links perfectly.

Tom
 

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