focus-creative-games / hybridclr_trial

HybridCLR 示例项目
https://code-philosophy.com/
850 stars 176 forks source link

导出包报错 #25

Closed dingxiaowei closed 1 year ago

dingxiaowei commented 1 year ago

Exception: Unity.IL2CPP.Building.BuilderFailedException: Lump_libil2cpp_vm.cpp D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(71): error C2039: "hash_compare": ���� "stdext" �ij�Ա D:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\iterator(1426): note: �μ���stdext�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(71): error C2065: ��hash_compare��: δ�����ı�ʶ�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(71): error C2275: ��Key��: ӦΪ����ʽ���������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(40): error C2976: ��Il2CppReaderWriterLockedHashMap'��: ģ�� ����̫�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(75): note: �μ���Il2CppReaderWriterLockedHashMap�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(40): error C2974: ��Il2CppReaderWriterLockedHashMap��:��HashFcn���� ģ�� ������Ч��ӦΪ���� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(75): note: �μ���Il2CppReaderWriterLockedHashMap�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(384): error C2662: ��bool Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::TryGet(const Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::key_type &,T )��: ���ܽ���this��ָ��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(384): note: ԭ������: �޷��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(384): note: ת��Ҫ��ڶ����û������ת����������캯�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(90): note: �μ���Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::TryGet�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(384): note: ����ƥ������б���(Il2CppClass , Il2CppClass *)��ʱ D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(437): error C2662: ��bool Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::Add(const Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::key_type &,const T &)��: ���ܽ���this��ָ��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(437): note: ԭ������: �޷��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(437): note: ת��Ҫ��ڶ����û������ת����������캯�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(102): note: �μ���Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::Add�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(437): note: ����ƥ������б���(Il2CppClass , Il2CppClass *)��ʱ D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): error C2955: ��Il2CppReaderWriterLockedHashMap��: ʹ�� �� ģ�� ��Ҫ ģ�� �����б� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(75): note: �μ���Il2CppReaderWriterLockedHashMap�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): error C2662: ��Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::iterator Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedBegin(void)��: ���ܽ���this��ָ��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): note: ԭ������: �޷��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): note: ת��Ҫ��ڶ����û������ת����������캯�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(121): note: �μ���Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedBegin�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): note: ����ƥ������б���()��ʱ D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): error C2662: ��Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::iterator Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedEnd(void)��: ���ܽ���this��ָ��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): note: ԭ������: �޷��ӡ�PointerTypeMap��ת��Ϊ��Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): note: ת��Ҫ��ڶ����û������ת����������캯�� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\utils/Il2CppHashMap.h(127): note: �μ���Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedEnd�������� D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\vm\MetadataCache.cpp(1142): note: ����ƥ������б���()��ʱ

Invocation was: Executable: "D:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\cl.exe" Arguments: "D:\Study\github\hybridclr_trial\Library\Il2cppBuildCache\Windows\x64\il2cppOutput\lumpedcpp\Lump_libil2cpp_vm.cpp" /nologo /c /bigobj /W3 /Z7 /EHs /GR- /Gy /utf-8 /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /wd4200 /wd4834 /Od /Zc:inline /RTC1 /MTd /DNET_4_0 /DUNITY_AOT /DIL2CPP_MONO_DEBUGGER_DISABLED /DGC_NOT_DLL /DRUNTIME_IL2CPP /DIL2CPP_DEBUG=1 /DBASELIB_INLINE_NAMESPACE=il2cpp_baselib /D_WIN32 /DWIN32 /DWIN32_THREADS /D_WINDOWS /DWINDOWS /D_UNICODE /DUNICODE /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS /DNOMINMAX /D_DEBUG /DDEBUG /DIL2CPP_DEBUG=1 /DWINDOWS_SDK_BUILD_VERSION=22000 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP /I"D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp" /I"D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp" /I"D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\external\bdwgc\include" /I"D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\external\xxHash" /I"D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\external\baselib\Include" /I"D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\external\baselib\Platforms\Windows\Include" /I"D:\Study\github\hybridclr_trial\HybridCLRData\LocalIl2CppData-WindowsEditor\il2cpp\libil2cpp\pch" /I"D:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\winrt" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt" /Fo"D:\Study\github\hybridclr_trial\Library\il2cpp_cache\libil2cpp\D667C9B3AE77C964A077399DB2CC8AEF.obj" /Fd"D:\Study\github\hybridclr_trial\Library\il2cpp_cache\libil2cpp\D667C9B3AE77C964A077399DB2CC8AEF.pdb" EnvArg key: PATH value: C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;D:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection1 matchedAssemblyMethodSourceFiles) at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions) UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <8d4895b259be41298a685a0c9b423575>:0) UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <8d4895b259be41298a685a0c9b423575>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo) (at <8d4895b259be41298a685a0c9b423575>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <8d4895b259be41298a685a0c9b423575>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <8d4895b259be41298a685a0c9b423575>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <8d4895b259be41298a685a0c9b423575>:0) DesktopStandalonePostProcessor.RunIL2CPP (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, System.Collections.Generic.List1[T] cppPlugins) (at <8d4895b259be41298a685a0c9b423575>:0) DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet1[T] filesToNotOverwrite) (at <8d4895b259be41298a685a0c9b423575>:0) DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <8d4895b259be41298a685a0c9b423575>:0) Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown. DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <8d4895b259be41298a685a0c9b423575>:0) UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <8d4895b259be41298a685a0c9b423575>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <8d4895b259be41298a685a0c9b423575>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

dingxiaowei commented 1 year ago

看到错误列表里有说明:Win 下 打包时遇到 xxxx\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2039: 'hash_compare': is not a member of 'stdext'