Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unable to build a standalone build using Il2cpp

Discussion in 'Editor & General Support' started by jvt619, Feb 28, 2020.

  1. jvt619

    jvt619

    Joined:
    Jul 4, 2013
    Posts:
    53
    Everytime I try to build a standalone for pc using il2cpp, it will always fail. Mono scripting is fine though.

    Code (CSharp):
    1. Failed running C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x64" --configuration="Release" --outputpath="C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\JVT\Documents\Project Gedia 2018 LFS\Assets\..\Library/il2cpp_cache" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp\StagingArea\Data\Managed" --generatedcppdir="C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp\StagingArea\Data\il2cppOutput"
    2.  
    3. stdout:
    4. Building GameAssembly.dll with MsvcDesktopToolChain
    5.     Msvc Install Version: 15.0
    6.     Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
    7.     Msvc Linker Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe
    8.     Msvc Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe
    9.  
    10.     Output directory: C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp\StagingArea\Data\Native
    11.     Cache directory: C:\Users\JVT\Documents\Project Gedia 2018 LFS\Library\il2cpp_cache
    12. il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: Il2CppTypeDefinitions.cpp
    13. C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\il2cpp\libil2cpp\il2cpp-config.h(3): fatal error C1083: Cannot open include file: 'assert.h': No such file or directory
    14.  
    15. Invocation was: Executable: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe"
    16. Arguments: "C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp\StagingArea\Data\il2cppOutput\Il2CppTypeDefinitions.cpp" /nologo /c /bigobj /W3 /Zi /EHs /GR- /Gy /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /Ox /Oi /Oy- /GS- /Gw /GF /Zo /MT /DNET_4_0 /DUNITY_AOT /DGC_NOT_DLL /DRUNTIME_IL2CPP /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_NDEBUG /DNDEBUG /DWINDOWS_SDK_BUILD_VERSION=18362 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP /I"C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\il2cpp\libil2cpp" /I"C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\il2cpp\external\boehmgc\include" /I"C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp\StagingArea\Data\il2cppOutput" /I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" /Fo"C:\Users\JVT\Documents\Project Gedia 2018 LFS\Library\il2cpp_cache\64DFD413329EB21543C245E161C48C69.obj" /Fd"C:\Users\JVT\Documents\Project Gedia 2018 LFS\Library\il2cpp_cache\64DFD413329EB21543C245E161C48C69.pdb"
    17. EnvArg key: PATH value: C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64
    18.  
    19.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    20.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    21.   at il2cpp.Program.DoRun(String[] args)
    22.   at il2cpp.Program.Run(String[] args)
    23.   at il2cpp.Program.Main(String[] args)
    24. stderr:
    25.  
    26. Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: Il2CppTypeDefinitions.cpp
    27. C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\il2cpp\libil2cpp\il2cpp-config.h(3): fatal error C1083: Cannot open include file: 'assert.h': No such file or directory
    28.  
    29. Invocation was: Executable: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe"
    30. Arguments: "C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp\StagingArea\Data\il2cppOutput\Il2CppTypeDefinitions.cpp" /nologo /c /bigobj /W3 /Zi /EHs /GR- /Gy /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /Ox /Oi /Oy- /GS- /Gw /GF /Zo /MT /DNET_4_0 /DUNITY_AOT /DGC_NOT_DLL /DRUNTIME_IL2CPP /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_NDEBUG /DNDEBUG /DWINDOWS_SDK_BUILD_VERSION=18362 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP /I"C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\il2cpp\libil2cpp" /I"C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\il2cpp\external\boehmgc\include" /I"C:\Users\JVT\Documents\Project Gedia 2018 LFS\Temp\StagingArea\Data\il2cppOutput" /I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" /Fo"C:\Users\JVT\Documents\Project Gedia 2018 LFS\Library\il2cpp_cache\64DFD413329EB21543C245E161C48C69.obj" /Fd"C:\Users\JVT\Documents\Project Gedia 2018 LFS\Library\il2cpp_cache\64DFD413329EB21543C245E161C48C69.pdb"
    31. EnvArg key: PATH value: C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64
    32.  
    33.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    34.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    35.   at il2cpp.Program.DoRun(String[] args)
    36.   at il2cpp.Program.Run(String[] args)
    37.   at il2cpp.Program.Main(String[] args)
    38.  
    39. UnityEngine.Debug:LogError(Object)
    40. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    41. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    42. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:376)
    43. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:357)
    44. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    45. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:42)
    46. DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:246)
    47. DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:46)
    48. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    49.  
     
unityunity