목차

반응형

유니티에서 빌드를 하다 보면 아래와 같은 오류가 발생할 때가 있다.

Failed running C:\Program Files\2019.4.5f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/2019.4.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/2019.4.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/2019.3.15f1/NDK/android-ndk-r19" --profiler-report --map-file-parser="C:/Program Files/2019.4.5f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/user/Desktop/workspace/SuperHeadLeague-master/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=C:/Users/user/Desktop/workspace/SuperHeadLeague-master/Temp/StagingArea/Il2Cpp/il2cppOutput 

stdout:
Building libil2cpp.so with AndroidToolChain
	Output directory: C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
	Cache directory: C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
ObjectFiles: 371 of which compiled: 0
Total compilation time: 259 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\2019.3.15f1\NDK\android-ndk-r19\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\user\AppData\Local\Temp\tmp5F14.tmp" -o "C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_E7F6115F0E77C4908A52DED5466D075E\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction -llog -rdynamic -fuse-ld=gold.exe

C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5065: error: undefined reference to 'Presto_getBatterylife'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5076: error: undefined reference to 'Presto_getCountry'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5076: error: undefined reference to 'Presto_getCountry'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5065: error: undefined reference to 'Presto_getBatterylife'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5899: error: undefined reference to 'Presto_UUID'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5888: error: undefined reference to 'Presto_UnityInit'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5899: error: undefined reference to 'Presto_UUID'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5888: error: undefined reference to 'Presto_UnityInit'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


   ��ġ: Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
   ��ġ: Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   ��ġ: il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
   ��ġ: il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
   ��ġ: il2cpp.Program.Main(String[] args)
stderr:

���� ���� ����: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\2019.3.15f1\NDK\android-ndk-r19\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\user\AppData\Local\Temp\tmp5F14.tmp" -o "C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_E7F6115F0E77C4908A52DED5466D075E\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction -llog -rdynamic -fuse-ld=gold.exe

C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5065: error: undefined reference to 'Presto_getBatterylife'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5076: error: undefined reference to 'Presto_getCountry'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5076: error: undefined reference to 'Presto_getCountry'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5065: error: undefined reference to 'Presto_getBatterylife'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5899: error: undefined reference to 'Presto_UUID'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5888: error: undefined reference to 'Presto_UnityInit'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5899: error: undefined reference to 'Presto_UUID'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5888: error: undefined reference to 'Presto_UnityInit'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


   ��ġ: Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
   ��ġ: Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   ��ġ: il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
   ��ġ: il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
   ��ġ: il2cpp.Program.Main(String[] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(Il2CppBuildPipelineData, String, String, Boolean)
UnityEditorInternal.IL2CPPBuilder:Run()
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

위는 오류 전문이다.

 

 

C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5065: error: undefined reference to 'Presto_getBatterylife'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5076: error: undefined reference to 'Presto_getCountry'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5076: error: undefined reference to 'Presto_getCountry'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5065: error: undefined reference to 'Presto_getBatterylife'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5899: error: undefined reference to 'Presto_UUID'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5888: error: undefined reference to 'Presto_UnityInit'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5899: error: undefined reference to 'Presto_UUID'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5888: error: undefined reference to 'Presto_UnityInit'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
C:\Users\user\Desktop\workspace\SuperHeadLeague-master\Temp\StagingArea\Il2Cpp\il2cppOutput/GPresto_iOS.cpp:5910: error: undefined reference to 'Presto_UserType'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

오류가 굉장히 길어서 도대체 어디가 문제인가 싶을 텐데 이 부분만 보면 된다. undefiend undefined reference to ~~~

해당 부분이 안드로이드에서 호출하려고하니 정의가 없어서 빌드를 못하겠다는 것이다.

 

나 같은 경우는 경로에 써있는 라이브러리가 문제를 일으키는 것이다.

고맙다 GPresto... 덕분에 제 시간을 날렸어요!

반응형