Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Android build: clang++: error: linker command failed with exit code 1

Discussion in 'Android' started by Slobdell, Nov 17, 2021.

  1. Slobdell

    Slobdell

    Joined:
    Jan 15, 2013
    Posts:
    13
    I recently upgraded my project to 2021 (currently 2021.2.2f1), and began getting this error when building for Android. I'm a little lost, because it doesn't really point me to anything as a possible solution, hoping someone can help. Thanks

    It seems odd these errors all have IOSWebViewWindow in them when building for Android, but that may not be an issue. Also, I just tried going back to the version that was previously working, and it no longer works.

    Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output:
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_Init_m48167CEBE4AE03C7A604A777B3BAB6CDA2D865E5':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3161: undefined reference to `_CWebViewPlugin_Init'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_Destroy_m0F1653661A9755A888AE09A4F0235FAC82B2853B':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3179: undefined reference to `_CWebViewPlugin_Destroy'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetMargins_m1626783137750E80B37A52D8F1B968CBC76EEEF0':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3189: undefined reference to `_CWebViewPlugin_SetMargins'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetVisibility_m32B2B1FCF5A17B11F45F1505C558F94C50DB6ED5':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3198: undefined reference to `_CWebViewPlugin_SetVisibility'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetAlertDialogEnabled_m9CD356EDBF1D3FF4421E2814ADF56CED340F72A5':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3207: undefined reference to `_CWebViewPlugin_SetAlertDialogEnabled'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetScrollBounceEnabled_m26116553EA1563FBA4E6AB6F3B176BCA51C6BB7F':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3216: undefined reference to `_CWebViewPlugin_SetScrollBounceEnabled'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetURLPattern_m92A3784D7F10B9DA7A9B81C2840D712A2F6C7F69':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3237: undefined reference to `_CWebViewPlugin_SetURLPattern'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_LoadURL_mDE10CCC63EB3FB12E8C96232027D0A6492C96EE4':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3263: undefined reference to `_CWebViewPlugin_LoadURL'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_LoadHTML_m62C0D585F7E26FEAE8D4BE48C260FAE91FC14E1E':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3284: undefined reference to `_CWebViewPlugin_LoadHTML'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_EvaluateJS_m79F34BB38D4949855DB60411623CF8A87F51B96A':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3305: undefined reference to `_CWebViewPlugin_EvaluateJS'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_Progress_m83685F609C23EBD7548EF293C070E4868A21C96A':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3318: undefined reference to `_CWebViewPlugin_Progress'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_CanGoBack_m3B898B908C0C3D0694BA4E8BFEEC1A763E578DDB':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3328: undefined reference to `_CWebViewPlugin_CanGoBack'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_CanGoForward_mD08F3569A954D75CEDAE78DA946B7CFDA89675CB':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3338: undefined reference to `_CWebViewPlugin_CanGoForward'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_GoBack_m850095DD617FFFA052E316484394A4E1510D7465':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3348: undefined reference to `_CWebViewPlugin_GoBack'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_GoForward_m7C481014CC46ED3F364B6D4FDD6A01E265513618':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3357: undefined reference to `_CWebViewPlugin_GoForward'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_Reload_m877FA0FA01544A9AC6D5111E013C95C0938A250D':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3366: undefined reference to `_CWebViewPlugin_Reload'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_AddCustomHeader_mE55094DA422B4D99009B15A443C62DA06E832231':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3383: undefined reference to `_CWebViewPlugin_AddCustomHeader'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_GetCustomHeaderValue_mE44243BF7AA96B751CF429918A7F6468EF605BD4':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3404: undefined reference to `_CWebViewPlugin_GetCustomHeaderValue'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_RemoveCustomHeader_mE3E86AF59A81AE58AA28B263E5926FC186047951':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3430: undefined reference to `_CWebViewPlugin_RemoveCustomHeader'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_ClearCustomHeader_m8757665FD05695C58CFF072835A199311B97CE6F':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3443: undefined reference to `_CWebViewPlugin_ClearCustomHeader'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_ClearCookies_m4A7FBACAFD7EA2B319140872DF659A2CD337AEA4':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3452: undefined reference to `_CWebViewPlugin_ClearCookies'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SaveCookies_m2FA598D8F6AD8503D72513F58AF54694C5410F43':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3461: undefined reference to `_CWebViewPlugin_SaveCookies'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_GetCookies_m1F1FA11E15A88B83B97DCA4C176A6E13D2552AE8':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3474: undefined reference to `_CWebViewPlugin_GetCookies'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetBasicAuthInfo_mF0EF69C4F23A5EED4334E61035EDDB5D02CBA8A4':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3504: undefined reference to `_CWebViewPlugin_SetBasicAuthInfo'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_ClearCache_m7B969E595D8F7AFA06723283FFD8282C2EF1721C':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3521: undefined reference to `_CWebViewPlugin_ClearCache'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetMargins_m1626783137750E80B37A52D8F1B968CBC76EEEF0':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3189: undefined reference to `_CWebViewPlugin_SetMargins'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetVisibility_m32B2B1FCF5A17B11F45F1505C558F94C50DB6ED5':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3198: undefined reference to `_CWebViewPlugin_SetVisibility'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetAlertDialogEnabled_m9CD356EDBF1D3FF4421E2814ADF56CED340F72A5':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3207: undefined reference to `_CWebViewPlugin_SetAlertDialogEnabled'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_SetScrollBounceEnabled_m26116553EA1563FBA4E6AB6F3B176BCA51C6BB7F':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3216: undefined reference to `_CWebViewPlugin_SetScrollBounceEnabled'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_LoadURL_mDE10CCC63EB3FB12E8C96232027D0A6492C96EE4':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3263: undefined reference to `_CWebViewPlugin_LoadURL'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_EvaluateJS_m79F34BB38D4949855DB60411623CF8A87F51B96A':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3305: undefined reference to `_CWebViewPlugin_EvaluateJS'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_Progress_m83685F609C23EBD7548EF293C070E4868A21C96A':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3318: undefined reference to `_CWebViewPlugin_Progress'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_CanGoBack_m3B898B908C0C3D0694BA4E8BFEEC1A763E578DDB':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3328: undefined reference to `_CWebViewPlugin_CanGoBack'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_CanGoForward_mD08F3569A954D75CEDAE78DA946B7CFDA89675CB':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3338: undefined reference to `_CWebViewPlugin_CanGoForward'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_GoBack_m850095DD617FFFA052E316484394A4E1510D7465':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3348: undefined reference to `_CWebViewPlugin_GoBack'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_GoForward_m7C481014CC46ED3F364B6D4FDD6A01E265513618':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3357: undefined reference to `_CWebViewPlugin_GoForward'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_Reload_m877FA0FA01544A9AC6D5111E013C95C0938A250D':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3366: undefined reference to `_CWebViewPlugin_Reload'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_RemoveCustomHeader_mE3E86AF59A81AE58AA28B263E5926FC186047951':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3430: undefined reference to `_CWebViewPlugin_RemoveCustomHeader'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_ClearCustomHeader_m8757665FD05695C58CFF072835A199311B97CE6F':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3443: undefined reference to `_CWebViewPlugin_ClearCustomHeader'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_ClearCache_m7B969E595D8F7AFA06723283FFD8282C2EF1721C':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3521: undefined reference to `_CWebViewPlugin_ClearCache'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow_ClearCookies_m530416D3C800ACB241282DB1A3AC356B3EFD6BD5':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3452: undefined reference to `_CWebViewPlugin_ClearCookies'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow_SaveCookies_m8404A25B5A85BAED20C6F1DE82AE1BE5961FD44B':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3461: undefined reference to `_CWebViewPlugin_SaveCookies'
    Library/Bee/artifacts/Android/d8kzr/3rav_WebView.o: In function `IOSWebViewWindow__CWebViewPlugin_Destroy_m0F1653661A9755A888AE09A4F0235FAC82B2853B':
    C:/Users/Steve/Documents/Developer/Unity/Projects/VRPartyGame/VRPartyGame/Library/Bee/artifacts/Android/il2cppOutput/cpp/WebView.cpp:3179: undefined reference to `_CWebViewPlugin_Destroy'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    0x00007ff725e7815d (Unity) StackWalker::GetCurrentCallstack
    0x00007ff725e7eeb9 (Unity) StackWalker::ShowCallstack
    0x00007ff726dc7503 (Unity) GetStacktrace
    0x00007ff72744b4bd (Unity) DebugStringToFile
    0x00007ff72500d412 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000022d3dfc483a (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    0x0000022d3dfc46cb (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000022d3dfc388e (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x0000022e75717dda (Mono JIT Code) UnityEngine.Debug:LogError (object)
    0x0000022e75717833 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:DefaultResultProcessor (Bee.BeeDriver.NodeResult,bool,bool)
    0x0000022e7571623b (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:ReportBuildResults (Bee.BeeDriver.BeeDriverResult)
    0x0000022b62ce5443 (Mono JIT Code) UnityEditor.Modules.BeeBuildPostprocessor:postProcess (UnityEditor.Modules.BuildPostProcessArgs)
    0x0000022b62ce44fe (Mono JIT<message truncated>
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Check for function names which go after "undefined reference to", you either need to provide implementation for them on Android or don't call those, by #if !UNITY_ANDROID ... #endif
     
    Lucifer95 likes this.
  3. coderxx

    coderxx

    Joined:
    Dec 17, 2015
    Posts:
    6
    I'm facing the same issue. This happened after I used Ready Player Me on my project. I feel like it's an error with their WebView implementation for loading a character. Let me know if you used the same thing as well.
     
  4. sgt3v

    sgt3v

    Joined:
    Feb 19, 2017
    Posts:
    28
    This issue is related to the platform-dependent compilation block not being added as mentioned above. In the latest version of the SDK, this issue is solved. Also, you can fix it by wrapping the content of IOSWebViewWindow.cs into #if UNITY_IOS ... #endif
     
  5. samkoni27

    samkoni27

    Joined:
    Jan 18, 2019
    Posts:
    2
    Hi, I am also facing something similar issue, I am able to build on a mono backend but when I go for il2cpp it shows this thing


    Exception: Unity.IL2CPP.Building.BuilderFailedException: G:\Softwares\2020.3.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\samko\AppData\Local\Temp\tmp5B0F.tmp" -o "F:\Augurs Project\arvrinsurance\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_8B35A8275BFDFCA3E63489D3EFB61517\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 "G:\Softwares\2020.3.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\StaticLibs\armeabi-v7a\baselib.a" -llog -rdynamic -Wl,--icf=safe -Wl,--icf-iterations=5 -fuse-ld=gold.exe

    F:\Augurs Project\arvrinsurance\Library\Il2cppBuildCache\Android\armeabi-v7a\il2cppOutput/Assembly-CSharp5.cpp:43191: error: undefined reference to 'openWindow'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 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 <dc14d30a5e0540ee9311ed6df63d9074>:0)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <dc14d30a5e0540ee9311ed6df63d9074>:0)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>: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 <dc14d30a5e0540ee9311ed6df63d9074>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,771
    This failure occurs because the code in the project has extern methods in C#. Methods marked as extern with a the [Dllimport("__Internal")] attribute must be present in a native library that is linked with the Unity player when building with the IL2CPP scripting backend.
    For example, this in this project one function which causes this issue is named: openWindow
    You have two options:
    1. Build a native library with all of the methods marked as extern with the [Dllimport("__Internal")] attribute for the target platform and architecture of the player. See this documentation for details about native plugins: https://docs.unity3d.com/Manual/NativePlugins.html
    2. Remove the C# code which defines this extern method. You can do that with platform dependent compilation: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
     
    dong2020, chaehyeok and samkoni27 like this.
  7. samkoni27

    samkoni27

    Joined:
    Jan 18, 2019
    Posts:
    2

    Thanks a lot @JoshPeterson you really made my day out here :)
     
    JoshPeterson likes this.