一次Unity3D IL2CPP 打包错误

时间:2025-02-18 09:53:42
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2039: 'hash_compare': is not a member of 'stdext'
  • C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.34.31933\include\iterator(1426): note: see declaration of 'stdext'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2065: 'hash_compare': undeclared identifier
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2275: 'Key': expected an expression instead of a type
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(38): error C2976: 'Il2CppReaderWriterLockedHashMap': too few template arguments
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(38): error C2974: 'Il2CppReaderWriterLockedHashMap': invalid template argument for 'HashFcn', type expected
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(38): error C2955: 'Il2CppReaderWriterLockedHashMap': use of class template requires template argument list
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(47): error C2955: 'Il2CppReaderWriterLockedHashMap': use of class template requires template argument list
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(385): error C2662: 'bool Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::TryGet(const Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::key_type &,T *)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(385): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(385): note: Conversion requires a second user-defined-conversion operator or constructor
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(90): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::TryGet'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(385): note: while trying to match the argument list '(Il2CppClass *, Il2CppClass **)'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(438): error C2662: 'bool Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::Add(const Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::key_type &,const T &)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(438): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(438): note: Conversion requires a second user-defined-conversion operator or constructor
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(102): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::Add'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(438): note: while trying to match the argument list '(Il2CppClass *, Il2CppClass *)'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): error C2955: 'Il2CppReaderWriterLockedHashMap': use of class template requires template argument list
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): error C2662: 'Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::iterator Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedBegin(void)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): note: Conversion requires a second user-defined-conversion operator or constructor
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(121): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedBegin'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): note: while trying to match the argument list '()'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): error C2662: 'Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::iterator Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedEnd(void)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): note: Conversion requires a second user-defined-conversion operator or constructor
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(127): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedEnd'
  • C:\Program Files\Unity\Hub\Editor\2022.1.22f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1157): note: while trying to match the argument list '()'
  • UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()