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

Bug Unity windows IL2CPP build error GameAssembly.dll failed

Discussion in 'Editor & General Support' started by edunok06_unity, May 31, 2023.

  1. edunok06_unity

    edunok06_unity

    Joined:
    Feb 27, 2020
    Posts:
    12
    Hi all,

    I ran a win stanalone x64 build with IL2CPP and got those error:


    Building Library\Bee\artifacts\WinPlayerBuildProgram\u1oik\GameAssembly.dll failed with output:
    Creation of library Library/Bee/artifacts/WinPlayerBuildProgram/u1oik/GameAssembly.dll.lib and of object Library/Bee/artifacts/WinPlayerBuildProgram/u1oik/GameAssembly.dll.exp
    rluutxashcc0.obj : error LNK2019: external symbol reference dlopen not resolved in function InteropLibraryLoader_Load_mC870612748A6487A3B95C275EAF291F31C150F3B
    rluutxashcc0.obj : error LNK2019: external symbol reference dlsym not resolved in function LinuxInterops_dlsym_mC54414FD6569FEE07DB1E39B39C935ECFD6EE24E
    rluutxashcc0.obj : error LNK2019: external symbol reference dlclose not resolved in function InteropLibraryLoader_Unload_mDE610081A54FFFDE87B8D8FE8472A9E0B57B269C
    Library\Bee\artifacts\WinPlayerBuildProgram\u1oik\GameAssembly.dll : fatal error LNK1120

    Any ideas?
    Thanks in advance
     
  2. KimHyungCheol

    KimHyungCheol

    Joined:
    Dec 16, 2016
    Posts:
    3
    I have the same problem. also.
     
  3. pravusjif

    pravusjif

    Joined:
    Jul 24, 2012
    Posts:
    18
    Hello, almost the same error is happening to me too with Unity 2021.3.22f1, anyone found what's the cause??
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,436
    Generally means you have a script or a precompiled DLL in your project that does "[DllImport("__Internal")]" and doesn't provide the method implementation for Windows. When using IL2CPP, these methods get resolved statically at link time and if they're missing you get such linker error.
     
  5. leon_unity65

    leon_unity65

    Joined:
    May 19, 2023
    Posts:
    4
  6. pravusjif

    pravusjif

    Joined:
    Jul 24, 2012
    Posts:
    18
    Oh that's a great tip and makes a lot of sense, I'll look into that, thank you!