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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Wanted to try IL2CPP in 5.4 but I'm running into a problem

Discussion in 'Android' started by AgusB, Jul 29, 2016.

  1. AgusB

    AgusB

    Joined:
    Jun 20, 2013
    Posts:
    65
    I already tried to use it before but it required unity to be installed at the root directory. Now that I tried again it seems it doesn't need that anymore but ir fails compiling anyway.
    Possibly due to the plugins that are used. Google Play Games and Google Ads (Admob).

    I'll Paste the errors from the editor:
    Failed running D:/Android/ndk/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/windows-x86_64/bin/clang++ -o "Temp/StagingArea\assets\bin\Data\Native\x86\libil2cpp.so.debug" -Wl,-soname,libil2cpp.so.debug --sysroot "D:/Android/ndk/android-ndk-r10e/platforms/android-9/arch-x86" -gcc-toolchain "D:/Android/ndk/android-ndk-r10e/toolchains/x86-4.9/prebuilt/windows-x86_64" -target i686-none-linux-android -shared -fuse-ld=gold -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Assembly-CSharp_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Assembly-CSharp_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Assembly-CSharp_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Assembly-CSharp_3.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Assembly-CSharp_4.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Assembly-CSharp_5.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_3.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_4.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_5.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_6.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_7.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_8.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Generics_9.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Mono.Security_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_Mono.Security_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_3.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_4.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_5.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_6.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_mscorlib_7.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_System.Core_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_System_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_System_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_UnityEngine.UI_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_UnityEngine.UI_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_UnityEngine_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_UnityEngine_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Bulk_UnityEngine_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\GenericMethods0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\GenericMethods1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppAttributes.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppCodeRegistration.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppCompilerCalculateTypeValuesTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppDelegateWrappersManagedToNativeTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppGenericClassTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppGenericInstDefinitions.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppGenericMethodDefinitions.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppGenericMethodPointerTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppGenericMethodTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppGuids.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppInvokerTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppMarshalingFunctionsTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppMetadataRegistration.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppMetadataUsage.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppMethodPointerTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppReversePInvokeWrapperTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\x86\Il2CppTypeDefinitions.o" -L "D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release/StaticLibs/x86" -lil2cpp -lbdwgc -L "D:/Android/ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86" -lgnustl_static

    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13315: error: undefined reference to 'GADUCreateSmartBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13293: error: undefined reference to 'GADUCreateBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13315: error: undefined reference to 'GADUCreateSmartBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13293: error: undefined reference to 'GADUCreateBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13353: error: undefined reference to 'GADUSetBannerCallbacks'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13389: error: undefined reference to 'GADURequestBannerAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13163: error: undefined reference to 'GADUCreateRequest'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13198: error: undefined reference to 'GADUAddKeyword'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13181: error: undefined reference to 'GADUAddTestDevice'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13211: error: undefined reference to 'GADUSetBirthday'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13220: error: undefined reference to 'GADUSetGender'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13229: error: undefined reference to 'GADUTagForChildDirectedTreatment'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13267: error: undefined reference to 'GADUSetRequestAgent'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13389: error: undefined reference to 'GADURequestBannerAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13371: error: undefined reference to 'GADUShowBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13371: error: undefined reference to 'GADUShowBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13362: error: undefined reference to 'GADUHideBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13362: error: undefined reference to 'GADUHideBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13380: error: undefined reference to 'GADURemoveBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13380: error: undefined reference to 'GADURemoveBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13163: error: undefined reference to 'GADUCreateRequest'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13181: error: undefined reference to 'GADUAddTestDevice'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13198: error: undefined reference to 'GADUAddKeyword'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13211: error: undefined reference to 'GADUSetBirthday'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13220: error: undefined reference to 'GADUSetGender'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13229: error: undefined reference to 'GADUTagForChildDirectedTreatment'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13246: error: undefined reference to 'GADUSetExtra'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13267: error: undefined reference to 'GADUSetRequestAgent'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13402: error: undefined reference to 'GADUCreateInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13440: error: undefined reference to 'GADUSetInterstitialCallbacks'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13449: error: undefined reference to 'GADUInterstitialReady'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13459: error: undefined reference to 'GADUShowInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13468: error: undefined reference to 'GADURequestInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13477: error: undefined reference to 'GADUCreateRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13491: error: undefined reference to 'GADURewardBasedVideoAdReady'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13501: error: undefined reference to 'GADUShowRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13514: error: undefined reference to 'GADURequestRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13555: error: undefined reference to 'GADUSetRewardBasedVideoAdCallbacks'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13402: error: undefined reference to 'GADUCreateInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13468: error: undefined reference to 'GADURequestInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13449: error: undefined reference to 'GADUInterstitialReady'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13459: error: undefined reference to 'GADUShowInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13477: error: undefined reference to 'GADUCreateRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13514: error: undefined reference to 'GADURequestRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13501: error: undefined reference to 'GADUShowRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13491: error: undefined reference to 'GADURewardBasedVideoAdReady'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    UnityEngine.Debug:LogError(Object)
    NativeCompiler:RunProgram(ProcessStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:60)
    NativeCompiler:Execute(String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.Android.<CompileDynamicLibrary>c__AnonStorey2:<>m__6(TargetArchCompilerSettings)
    <ParallelFor>c__AnonStorey7C`1:<>m__11A(Object) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:89)


    Failed running D:/Android/ndk/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/windows-x86_64/bin/clang++ -o "Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so.debug" -Wl,-soname,libil2cpp.so.debug --sysroot "D:/Android/ndk/android-ndk-r10e/platforms/android-9/arch-arm" -gcc-toolchain "D:/Android/ndk/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64" -target armv7-none-linux-androideabi -shared -fuse-ld=gold -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Assembly-CSharp_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Assembly-CSharp_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Assembly-CSharp_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Assembly-CSharp_3.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Assembly-CSharp_4.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Assembly-CSharp_5.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_3.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_4.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_5.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_6.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_7.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_8.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Generics_9.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Mono.Security_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_Mono.Security_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_3.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_4.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_5.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_6.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_mscorlib_7.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_System.Core_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_System_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_System_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_UnityEngine.UI_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_UnityEngine.UI_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_UnityEngine_0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_UnityEngine_1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Bulk_UnityEngine_2.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\GenericMethods0.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\GenericMethods1.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppAttributes.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppCodeRegistration.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppCompilerCalculateTypeValuesTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppDelegateWrappersManagedToNativeTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppGenericClassTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppGenericInstDefinitions.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppGenericMethodDefinitions.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppGenericMethodPointerTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppGenericMethodTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppGuids.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppInvokerTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppMarshalingFunctionsTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppMetadataRegistration.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppMetadataUsage.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppMethodPointerTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppReversePInvokeWrapperTable.o" "Temp/StagingArea\Il2Cpp\il2cppOutput\armeabi-v7a\Il2CppTypeDefinitions.o" -L "D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release/StaticLibs/armeabi-v7a" -lil2cpp -lbdwgc -L "D:/Android/ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a" -lgnustl_static

    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13315: error: undefined reference to 'GADUCreateSmartBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13293: error: undefined reference to 'GADUCreateBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13315: error: undefined reference to 'GADUCreateSmartBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13293: error: undefined reference to 'GADUCreateBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13353: error: undefined reference to 'GADUSetBannerCallbacks'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13389: error: undefined reference to 'GADURequestBannerAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13163: error: undefined reference to 'GADUCreateRequest'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13198: error: undefined reference to 'GADUAddKeyword'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13181: error: undefined reference to 'GADUAddTestDevice'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13211: error: undefined reference to 'GADUSetBirthday'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13220: error: undefined reference to 'GADUSetGender'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13229: error: undefined reference to 'GADUTagForChildDirectedTreatment'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13267: error: undefined reference to 'GADUSetRequestAgent'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13389: error: undefined reference to 'GADURequestBannerAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13371: error: undefined reference to 'GADUShowBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13371: error: undefined reference to 'GADUShowBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13362: error: undefined reference to 'GADUHideBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13362: error: undefined reference to 'GADUHideBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13380: error: undefined reference to 'GADURemoveBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13380: error: undefined reference to 'GADURemoveBannerView'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13163: error: undefined reference to 'GADUCreateRequest'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13181: error: undefined reference to 'GADUAddTestDevice'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13198: error: undefined reference to 'GADUAddKeyword'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13211: error: undefined reference to 'GADUSetBirthday'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13220: error: undefined reference to 'GADUSetGender'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13229: error: undefined reference to 'GADUTagForChildDirectedTreatment'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13246: error: undefined reference to 'GADUSetExtra'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13267: error: undefined reference to 'GADUSetRequestAgent'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13402: error: undefined reference to 'GADUCreateInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13440: error: undefined reference to 'GADUSetInterstitialCallbacks'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13449: error: undefined reference to 'GADUInterstitialReady'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13459: error: undefined reference to 'GADUShowInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13468: error: undefined reference to 'GADURequestInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13477: error: undefined reference to 'GADUCreateRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13491: error: undefined reference to 'GADURewardBasedVideoAdReady'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13501: error: undefined reference to 'GADUShowRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13514: error: undefined reference to 'GADURequestRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13555: error: undefined reference to 'GADUSetRewardBasedVideoAdCallbacks'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13402: error: undefined reference to 'GADUCreateInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13468: error: undefined reference to 'GADURequestInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13449: error: undefined reference to 'GADUInterstitialReady'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13459: error: undefined reference to 'GADUShowInterstitial'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13477: error: undefined reference to 'GADUCreateRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13514: error: undefined reference to 'GADURequestRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13501: error: undefined reference to 'GADUShowRewardBasedVideoAd'
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13491: error: undefined reference to 'GADURewardBasedVideoAdReady'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    UnityEngine.Debug:LogError(Object)
    NativeCompiler:RunProgram(ProcessStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:60)
    NativeCompiler:Execute(String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.Android.<CompileDynamicLibrary>c__AnonStorey2:<>m__6(TargetArchCompilerSettings)
    <ParallelFor>c__AnonStorey7C`1:<>m__11A(Object) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:89)

    Failed running D:/Android/ndk/android-ndk-r10e/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-objcopy "Temp/StagingArea\assets\bin\Data\Native\x86\libil2cpp.so.debug" "Temp/StagingArea\assets\bin\Data\Native\x86\libil2cpp.so" --strip-all

    D:/Android/ndk/android-ndk-r10e/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-objcopy: 'Temp/StagingArea\assets\bin\Data\Native\x86\libil2cpp.so.debug': No such file
    UnityEngine.Debug:LogError(Object)
    NativeCompiler:RunProgram(ProcessStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:60)
    NativeCompiler:Execute(String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.Android.<CompileDynamicLibrary>c__AnonStorey2:<>m__7(TargetArchCompilerSettings)
    <ParallelFor>c__AnonStorey7C`1:<>m__11A(Object) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:89)

    Failed running D:/Android/ndk/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy "Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so.debug" "Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --strip-all

    D:/Android/ndk/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy: 'Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so.debug': No such file
    UnityEngine.Debug:LogError(Object)
    NativeCompiler:RunProgram(ProcessStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:60)
    NativeCompiler:Execute(String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    UnityEditor.Android.<CompileDynamicLibrary>c__AnonStorey2:<>m__7(TargetArchCompilerSettings)
    <ParallelFor>c__AnonStorey7C`1:<>m__11A(Object) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:89)

    Exception: IL2CPP Linkage failed
    UnityEditor.Android.AndroidIl2CppClangCompiler.CompileDynamicLibrary (System.String libraryFile, IEnumerable`1 sourceFiles, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:223)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean developmentBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:132)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.PrepareIl2cppFiles (UnityEditor.Android.PostProcessor.PostProcessorContext context, UnityEditor.Android.AndroidIl2CppPlatformProvider provider)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:176)
    UnityEditor.HostView:OnGUI()
     
  2. AgusB

    AgusB

    Joined:
    Jun 20, 2013
    Posts:
    65
    I also got some System Exceptions
    System.Exception: IL2CPP compile failed.
    at NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) [0x000dc] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\NativeCompiler.cs:62
    at NativeCompiler.Execute (System.String arguments, System.String compilerPath) [0x0000f] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\NativeCompiler.cs:26
    at UnityEditor.Android.AndroidIl2CppClangCompiler.Link (UnityEditor.Android.TargetArchCompilerSettings target, System.String outFile, IEnumerable`1 sourceFiles, IEnumerable`1 libraries, IEnumerable`1 libraryPaths) [0x00000] in <filename unknown>:0
    at UnityEditor.Android.AndroidIl2CppClangCompiler+<CompileDynamicLibrary>c__AnonStorey2.<>m__6 (UnityEditor.Android.TargetArchCompilerSettings target) [0x00000] in <filename unknown>:0
    UnityEditor.Android.<CompileDynamicLibrary>c__AnonStorey2:<>m__6(TargetArchCompilerSettings)
    <ParallelFor>c__AnonStorey7C`1:<>m__11A(Object) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:89)

    System.Exception: IL2CPP compile failed.
    at NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) [0x000dc] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\NativeCompiler.cs:62
    at NativeCompiler.Execute (System.String arguments, System.String compilerPath) [0x0000f] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\NativeCompiler.cs:26
    at UnityEditor.Android.AndroidIl2CppClangCompiler.ObjCopy (UnityEditor.Android.TargetArchCompilerSettings target, System.String source, System.String destination) [0x00000] in <filename unknown>:0
    at UnityEditor.Android.AndroidIl2CppClangCompiler+<CompileDynamicLibrary>c__AnonStorey2.<>m__7 (UnityEditor.Android.TargetArchCompilerSettings target) [0x00000] in <filename unknown>:0
    UnityEditor.Android.<CompileDynamicLibrary>c__AnonStorey2:<>m__7(TargetArchCompilerSettings)
    <ParallelFor>c__AnonStorey7C`1:<>m__11A(Object) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:89)
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    We were facing similar issues with WebGL / iOS. With the move to il2cpp, your code is translated into C++ as you probably know.

    For us, the issue was the declaration of extern functions in our code. These were implemented on iOS as native c++ code. When moving to another platform that uses il2cpp, if these functions are not #ifdef'd correctly, the compiler will assume these should be available and try to link them as well.

    From the error messages you posted, for example:
    Temp/StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_0.cpp:13280: error: undefined reference to 'GADURelease'

    What is "GADURelease" ? a quick search in google shows it's related to GoogleAds (e.g: AdMob).

    Here you can see that GADURelease is an extern (native) method:
    upload_2016-7-29_19-48-32.png
    Since this class is not wrapped in #if UNITY_IOS , the compiler assumes this method has to be available for android now as well.

    I am not sure why that should result in a compiler error though. Are you using these functions in your Android code ? all usage of these should be wrapped in an #if statement so it's never looked up by the compiler I guess...
     
  4. AgusB

    AgusB

    Joined:
    Jun 20, 2013
    Posts:
    65
    I'm not using any iOS function. The game is only for android. But the plugin has functions for both platforms.
     
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Is the plugin imported with its source code, or in compiled form?

    If it's in source code, you can try to wrap the whole Externs class in #if UNITY_IOS
    This class appears to be only iOS related, and you're not using any of that in the Android build anyway.

    Can you try that and write back the results it had ?
     
  6. dg-joseph

    dg-joseph

    Joined:
    Aug 19, 2016
    Posts:
    1
    Hi guys!

    I've come across this (nearly) same problem.
    On iOS, it builds fine. But when we switch to Android, a hugely similar error log appears.
    I haven't tried your suggestion, though. I'll try to get back with that (hopefully it doesn't take too long to implement).

    Meanwhile, I wonder if the OP was successful, or has found any other work-around?
     
  7. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Basically you have to look through the functions that Unity is trying to link when compiling for IL2CPP that it fails on, figure out which asset or code those functions come from and either fix the link problem with #ifdef code to exclude the attempt to link in that code or delete the asset so that code that causes the problem is not going to be included in the linking phase.

    Examples of common packages that you have to include workarounds for IL2CPP linker problems are Third Person Shooter by Opsive and Word Game Builder by ThinkSquirrel. Opsive has instructions and a package you install as a workaround. I am just about to ask ThinkSquirrel if they have such a workaround for their asset.
     
    Last edited: Aug 19, 2016
  8. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    OK, I've cleaned up all the obvious packages causing errors on my Android IL2CPP compilation attempts but I still get a failed compilation with one error message:

    Code (CSharp):
    1. Exception: IL2CPP Compilation failed
    2. UnityEditor.Android.AndroidIl2CppClangCompiler.CompileDynamicLibrary (System.String libraryFile, IEnumerable`1 sourceFiles, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths)
    3. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:223)
    4. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean developmentBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:132)
    5. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.PrepareIl2cppFiles (UnityEditor.Android.PostProcessor.PostProcessorContext context, UnityEditor.Android.AndroidIl2CppPlatformProvider provider)
    6. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    7. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    8. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
    9. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    10. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:176)
    11. UnityEditor.HostView:OnGUI()
    Anybody know what this is?

    I've seen this UnityEditor.HostView:OnGUI() cited in a number of seemingly unrelated compilation failures by searching the web but those had other error messages that lead them to the cause of the problem. The above is the only error message I have.
     
  9. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    OK, I fixed my IL2CPP problem for Android & maybe your fix would be similar.

    To update and correct my problem:

    The Android NDK listed at 1) was downloaded & installed as part of a bundle with Visual Studio and not sufficient to compile Unity Android apps using IL2CPP:

    NDK: C:/ProgramData/Microsoft/AndroidNDK/android-ndk-r10e

    To compile for Android using IL2CPP you need to definitely download that NDK from the Unity Preferences External Tools dialogue and extract to a path of your choosing.