Search Unity

Self Compiling il2cpp output?

Discussion in 'Windows' started by siliwangi, Jun 14, 2018.

  1. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    Does is it possible to self compiling the generated code from il2cpp output folder?.

    I have tried to compile with Visual Studio 2017 15.7.3 with adding all of the *.cpp, adding "C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp" as additional include dir.

    And after some tinkeringalso adding the following into my preprocessor :
    Code (csharp):
    1.  
    2. NDEBUG
    3. _WINDOWS
    4. _MSC_VER
    5. _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
    6. NET_4_0
    7.  
    But looks like there is no il2cpp.lib, hence the final linking is not possible because of no il2cpp.lib included in the unity default installation, and also compiling from libil2cpp folder is too many error from the project file.

    The reason for these are i wanted to add custom DRM into my il2cpp compiled windows games, should i use UnityLinker ?. If so how to do it?, what is the steps.

    Another feature request would be, unity should be automatically generating .visual studio project/solution file for the self compiled il2cpp output.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    We added this feature in 2018.2. I highly suggest you checkout the beta!

    The key to building IL2CPP generated code is to invoke il2cpp.exe to do it for you:

    Code (csharp):
    1. "<UNITY_INSTALL_DIR>\Editor\Data\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Release -platform=WindowsDesktop -outputpath="<OUTPUT_PATH>" --data-folder="<PATH_TO_GENERATED_IL2CPP_DATA_FOLDER>" -cachedirectory="<directory_for_cached_object_file>" -generatedcppdir="<directory_with_generated_source_code>" --additional-defines=UNITY_WIN=1 --additional-defines=UNITY_STANDALONE_WIN=1 --additional-defines=PLATFORM_WIN=1 --additional-defines=PLATFORM_STANDALONE_WIN=1 -dotnetprofile=unityjit -verbose --map-file-parser="<UNITY_INSTALL_DIR>\Editor\Data\IL2CPP\MapFileParser\MapFileParser.exe"
    Now, the important bit is the dotnetprofile argument, and it's important to match it to whatever you have specified in player settings (otherwise all kinds of stuff will explode):

    .NET 2.0 Subset: "legacyunity"
    .NET 2.0: "net20"
    .NET 4.x: "unityjit"
    .NET Standard 2.0: "unityaot"
     
    siliwangi likes this.
  3. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    Thank you, thumbs up, finally!, will check it out once it's goes out of beta. :)
     
  4. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    @Tautvydas-Zilys

    I am getting exception when trying the command above :
    Code (csharp):
    1.  
    2. Creating library C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache\linkresult_B254400A9332F2C8C3CBA465EFF8A9D3\Test.lib and object C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache\linkresult_B254400A9332F2C8C3CBA465EFF8A9D3\Test.exp
    3. LIBCMT.lib(exe_wwinmain.obj) : error LNK2001: unresolved external symbol wWinMain
    4. C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache\linkresult_B254400A9332F2C8C3CBA465EFF8A9D3\Test.exe : fatal error LNK1120: 1 unresolved externals
    5.  
    6.    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    7.    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    8.    at il2cpp.Program.DoRun(String[] args)
    9.    at il2cpp.Program.Run(String[] args)
    10.    at il2cpp.Program.Main(String[] args)
    11.  
    12. Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.exe /out:"C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache\linkresult_B254400A9332F2C8C3CBA465EFF8A9D3\Test.exe" /DEBUG /INCREMENTAL:NO /MAP /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /LTCG /OPT:REF /OPT:ICF /HIGHENTROPYVA /NODEFAULTLIB:uuid.lib "user32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "Shell32.lib" "Crypt32.lib" "psapi.lib" "version.lib" "MsWSock.lib" "ws2_32.lib" "Iphlpapi.lib" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\lib\x64" /SUBSYSTEM:CONSOLE /ENTRY:wWinMainCRTStartup @"C:\Users\nameless\AppData\Local\Temp\tmpB659.tmp"
    13.  
    14. Creating library C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache\linkresult_B254400A9332F2C8C3CBA465EFF8A9D3\Test.lib and object C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache\linkresult_B254400A9332F2C8C3CBA465EFF8A9D3\Test.exp
    15. LIBCMT.lib(exe_wwinmain.obj) : error LNK2001: unresolved external symbol wWinMain
    16. C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache\linkresult_B254400A9332F2C8C3CBA465EFF8A9D3\Test.exe : fatal error LNK1120: 1 unresolved externals
    17.  
    18.    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    19.    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    20.    at il2cpp.Program.DoRun(String[] args)
    21.    at il2cpp.Program.Run(String[] args)
    22.    at il2cpp.Program.Main(String[] args)
    23.  
    And here is my parameters :
    Code (csharp):
    1.  
    2. il2cpp.exe --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Release -platform=WindowsDesktop -outputpath="C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Built\Test" --data-folder="C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Built\Client\LoginPluginUnity_BackUpThisFolder_ButDontShipItWithYourGame\il2cppOutput\Data" -cachedirectory="C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Library\il2cpp_cache" -generatedcppdir="C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Built\Client\LoginPluginUnity_BackUpThisFolder_ButDontShipItWithYourGame\il2cppOutput" --additional-defines=UNITY_WIN=1 --additional-defines=UNITY_STANDALONE_WIN=1 --additional-defines=PLATFORM_WIN=1 --additional-defines=PLATFORM_STANDALONE_WIN=1 -dotnetprofile=unityjit -verbose --map-file-parser="C:\Program Files\Unity 2018.2.0b8\Editor\Data\IL2CPP\MapFileParser\MapFileParser.exe"
    And yet there is no files generated on "C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Built\Test"
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    I believe it defaults it to compiling it into an executable if you don't provide an extension to your output path. And executable needs a WinMain to be compiled. Try changing the output path parameter to "C:\Users\nameless\Documents\Works\Projects\Unity\DarkRift2\Built\Test.dll"
     
    siliwangi likes this.
  6. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    WOW, cool, working fine now, thanks.

    There are few caveats for compiling MapFileParser on windows :
    Change all occurrences of
    Code (csharp):
    1.  
    2. #include "UnityPrefix.h"
    3.  
    into :
    Code (csharp):
    1.  
    2. #include "../../UnityPrefix.h"
    3.  
    Also comment out these following line on UnityPrefix.h :
    Code (csharp):
    1.  
    2. // This has to be included before defining platform macros.
    3. //#include "Configuration/PrefixConfigure.h"
    4.  
    5. #ifdef _DEBUG
    6. #if defined(ENABLE_UNIT_TESTS)
    7. #undef ENABLE_UNIT_TESTS
    8. #endif
    9. #define ENABLE_UNIT_TESTS 1
    10. #endif
    11.  
    12. //#include "Runtime/Logging/LogAssert.h"
    13.  
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Hmm, it shouldn't compile map file parser if it finds it in the place you specified on the command line.
     
  8. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    On mine, the "C:\Program Files\Unity 2018.2.0b8\Editor\Data\IL2CPP\MapFileParser\MapFileParser.exe" doesn't exist or not compiled yet o_O.

    About the il2cpp output, is there any more documentation on how the Unity Player loaded the compiled gameassembly.dll?. I meant in which function does the Unity Player loaded the Bulk_Assembly-CSharp-firstpass_0.cpp & Bulk_Assembly-CSharp_0.cpp ?.

    I am trying to make a tutorials for virtualizing the most important function in generated il2cpp output. Here is the function that i was tried :


    but no luck, the dll seems doesn't load anymore. What i have meant is sort of entry point of functions to load the compiled game's script.
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Looks like MapFileParser is in a different directory, my bad. It's in "Editor\Data\Tools\MapFileParser\MapFileParser.exe".

    I don't really understand your question. On Windows, Unity uses LoadLibrary API to load the native binary, and then uses GetProcAddress to get access to IL2CPP API (I highly discourage calling those API functions yourself, though. But if you want to look at the API, look for il2cpp-api.cpp).
     
    siliwangi likes this.
  10. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    Is it still working @Tautvydas-Zilys ? Can't find any docs on the topic, there's no "_BackUpThisFolder_ButDontShipItWithYourGame\il2cppOutput\Data" folder only "_BackUpThisFolder_ButDontShipItWithYourGame\il2cppOutput\lumpedcpp"

    Pointed to "Build\ProjectName_Data\il2cpp_data" instead and it built fine but it created 4 files: .dll, .lib, .pdb, .exp. The created GameAssembly.dll is very small and game crashes on start.

    Edit seems like I had one path wrong, now I get this error:

    Code (CSharp):
    1. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: ThrowStub_ThrowNotSupportedException_mA248D7D785682F31CDF02FDC1FAB3173EE1B1E19 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    2. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __ComObject__ctor_m2A98911F497D95AC1C931674CC745F002A36C878 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    3. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_Advance_m6CAEF5CE3C7B57CBBDA5E0F5A391F6517C3791CC already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    4. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_Advance_m6CAEF5CE3C7B57CBBDA5E0F5A391F6517C3791CC_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    5. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_AtEnd_mE89AB87FFD62B3BA1D1E5B30052947890000EADC already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    6. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_AtEnd_mE89AB87FFD62B3BA1D1E5B30052947890000EADC_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    7. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_ConsumeSubString_mDFAADAA4A5FC450399046DB04CE10A4503961FAA already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    8. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_ConsumeSubString_mDFAADAA4A5FC450399046DB04CE10A4503961FAA_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    9. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetChar_m15E6D62E27D5EC6E7E726D2E6A719A95A521CAE6 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    10. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetChar_m15E6D62E27D5EC6E7E726D2E6A719A95A521CAE6_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    11. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetDigit_m0A4FC9D7AA54648B77398FAF7997FF7FED3694BF already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    12. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetDigit_m0A4FC9D7AA54648B77398FAF7997FF7FED3694BF_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    13. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetNextDigit_mE662D3828A0E0648E24F62FC5D750DA554364EFB already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    14. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetNextDigit_mE662D3828A0E0648E24F62FC5D750DA554364EFB_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    15. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetNext_mA99D360775F54B38E339C68D2E6007B7E028E1A3 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    16. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetNext_mA99D360775F54B38E339C68D2E6007B7E028E1A3_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    17. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetRegularToken_mD79E9337E33F2F9535DD89437EEDC2AF3F5A0B39 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    18. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetRegularToken_mD79E9337E33F2F9535DD89437EEDC2AF3F5A0B39_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    19. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetRepeatCount_m115C785C62A5A67CE2BCEA6789CA89BA5B0A97B5 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    20. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetRepeatCount_m115C785C62A5A67CE2BCEA6789CA89BA5B0A97B5_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    21. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetSeparatorToken_m2F4CE10AC9C39A5380D3DD5344B81F79C7006EF1 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    22. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetSeparatorToken_m2F4CE10AC9C39A5380D3DD5344B81F79C7006EF1_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    23. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetSubString_m699C79DE88DFBC0BDD9F85C2CDC155ABB1473DC4 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    24. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_GetSubString_m699C79DE88DFBC0BDD9F85C2CDC155ABB1473DC4_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    25. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchLongestWords_mCEDB8993665810AAB06045D6EFF076B89572C4BF already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    26. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchLongestWords_mCEDB8993665810AAB06045D6EFF076B89572C4BF_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    27. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchSpecifiedWord_m6399788FF78434EAD2231A2A7509B580EFED33B5 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    28. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchSpecifiedWord_m6399788FF78434EAD2231A2A7509B580EFED33B5_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    29. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchSpecifiedWord_m6B53744885B818B053CFE143A6AD0F778D617410 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    30. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchSpecifiedWord_m6B53744885B818B053CFE143A6AD0F778D617410_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    31. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchSpecifiedWords_mAD172D28B54FDBB34D5E8C8F92CB6C8B0EECDBA0 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    32. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_MatchSpecifiedWords_mAD172D28B54FDBB34D5E8C8F92CB6C8B0EECDBA0_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    33. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_Match_m6E1CE300661D15D140D2FAC5C54E74BDBE70EE19 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    34. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_Match_m6E1CE300661D15D140D2FAC5C54E74BDBE70EE19_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    35. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_Match_mC0335DA3DE8A7B7F93781B52A02655B6889E01B3 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    36. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_Match_mC0335DA3DE8A7B7F93781B52A02655B6889E01B3_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    37. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_RemoveLeadingInQuoteSpaces_m71E36820EEC9E50FFC1FA2F53FCFA3495EB2BC19 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    38. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_RemoveLeadingInQuoteSpaces_m71E36820EEC9E50FFC1FA2F53FCFA3495EB2BC19_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    39. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_RemoveTrailingInQuoteSpaces_m18A5B81964E3027BF02B1393CCD7781AB3ECA72F already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    40. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_RemoveTrailingInQuoteSpaces_m18A5B81964E3027BF02B1393CCD7781AB3ECA72F_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    41. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_SkipWhiteSpaceCurrent_m85EF1DCFFB216A209FEB3CC53CB8E977C51D71DB already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    42. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_SkipWhiteSpaceCurrent_m85EF1DCFFB216A209FEB3CC53CB8E977C51D71DB_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    43. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_SkipWhiteSpaces_mB4AA5270916EF04CD52A4F3C16B1FB08D0B0CF4F already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    44. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_SkipWhiteSpaces_mB4AA5270916EF04CD52A4F3C16B1FB08D0B0CF4F_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    45. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_TrimTail_m23E23486D88B86A755B551A9881F1FDA9D6DD99A already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    46. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_TrimTail_m23E23486D88B86A755B551A9881F1FDA9D6DD99A_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    47. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString__cctor_mC97C8C04AED3132252833D2119019C73BF6EFA80 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    48. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString__ctor_m9E9D21ACAC80CD2A8935D885767A9D7320A78FCF already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    49. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString__ctor_m9E9D21ACAC80CD2A8935D885767A9D7320A78FCF_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    50. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString__ctor_mE5FC300B73DE2B23E51414546030AF8625D1109E already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    51. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString__ctor_mE5FC300B73DE2B23E51414546030AF8625D1109E_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    52. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_get_CompareInfo_mE0381FC6A1AB82E0BDAF45F848568124B193FB51 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    53. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_get_CompareInfo_mE0381FC6A1AB82E0BDAF45F848568124B193FB51_AdjustorThunk already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    54. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_t6E7DE2A99E4F15F384EC29CC6CD5185F46818DD9_marshal_com already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    55. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_t6E7DE2A99E4F15F384EC29CC6CD5185F46818DD9_marshal_com_back already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    56. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_t6E7DE2A99E4F15F384EC29CC6CD5185F46818DD9_marshal_com_cleanup already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    57. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_t6E7DE2A99E4F15F384EC29CC6CD5185F46818DD9_marshal_pinvoke already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    58. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_t6E7DE2A99E4F15F384EC29CC6CD5185F46818DD9_marshal_pinvoke_back already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    59. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __DTString_t6E7DE2A99E4F15F384EC29CC6CD5185F46818DD9_marshal_pinvoke_cleanup already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    60. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __Filters_FilterAttribute_mBF9879ECFB908212C56CAE0B42C9E29BFCB347C1 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    61. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __Filters_FilterIgnoreCase_m883976C13C53B21BE3430DE51D4317CBCF89F53A already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    62. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __Filters_FilterName_m768C2766720890EE1D07554E3433C0F828D427DB already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    63. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __Filters__cctor_mAC913CDF08E7AB6541101C4B96483BF49C6E2F14 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    64. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __Filters__ctor_mA9DEA9B853B953C85A78E101A8001E9EE0E66B35 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    65. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __Il2CppComDelegate_Finalize_m893C22F7BEDFBDF8F015EA584CC1419D144D2187 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
    66. A061BC9ABA984850283AE55DE6A06B60.obj : error LNK2005: __Il2CppComObject_Finalize_m98123DBAAA7974D2616F9E90F2574955714CA9A9 already defined in BBC87A5D88654C0D14302C3E1B58133B.obj
     
    Last edited: Apr 22, 2020
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    On newer Unity versions you should just use "Generate Visual Studio Project" option. That will generate a project that invokes il2cpp.exe to build the generated code.
     
    Kamyker likes this.
  12. AnsisMalinsUbisoft

    AnsisMalinsUbisoft

    Joined:
    Oct 4, 2019
    Posts:
    10
    Where do I find the "Generate Visual Studio Project" option?
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    It's in the build options window:
    upload_2022-6-1_7-55-7.png
     
  14. AnsisMalinsUbisoft

    AnsisMalinsUbisoft

    Joined:
    Oct 4, 2019
    Posts:
    10
    I keep forgetting that window exists.