C ++ / CLI 64-разрядный сбой с ошибкой ссылки 2022 - PullRequest
1 голос
/ 08 сентября 2011

У меня есть 64-битный проект C ++ / CLI, скомпилированный с / clr: pure

При сборке я получаю следующие ошибки:

1>AssemblyInfo.obj : error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c00003f).
1>AssemblyInfo.obj : error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000044).

Я следовал инструкции здесь и использовал ILDASM для экспорта метаданных идентификаторов в ошибках.

//  Method #20 (06000014) 
//  -------------------------------------------------------
//      MethodName: atexit (06000014)
//      Flags     : [Assem] [Static] [ReuseSlot]  (00000013)
//      RVA       : 0x00000000
//      ImplFlags : [IL] [Managed] [ForwardRef]  (00000010)
//      CallCnvntn: [DEFAULT]
//      ReturnType: I4
//      1 Arguments
//          Argument #1:  FNPTR [DEFAULT] Void( )
//      1 Parameters
//          (1) ParamToken : (08000013) Name : _Function flags: [none] (00000000)
//      CustomAttribute #1 (0c000044)
//      -------------------------------------------------------
//          CustomAttribute Type: 0a00000a
//          CustomAttributeName: System.Security.SecurityCriticalAttribute :: instance void .ctor()
//          Length: 4
//          Value : 01 00 00 00                                      >                <
//          ctor args: ()

(и аналогичная запись для другой ошибки)

В статье говорится Armed with that, you can go back to your source files and determine why the type (class/struct) is being defined differently in the different source files.

Может кто-нибудь объяснить, почему я должен искать?

...