Getting a few IL2CPP compile errors when targeting Windows Desktop.
Question can or should you use IL2CPP when targeting Windows desktop?
What errors do you get?
You can use IL2CPP for Windows. Check out Unity - Manual: IL2CPP Overview for more information about it.
The gist of seems to be that il2cpp.exe doesn’t recognize that Visual Studio is installed (It is) WTF! Not sure what troubleshooting step to try next. is there possibly a Unity preference or something in Package manager I am missing?
stdout:
il2cpp.exe didn’t catch exception: System.InvalidOperationException: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have…
If possible, please post the full error log. However, it sounds like you don’t have the required C++ tools installed for Visual Studio.
Could you please follow the steps from the following post and see?
If they are indeed missing, try the following:
(Source: Install C and C++ support in Visual Studio | Microsoft Learn)
Yeah this is Unity requiring Visual studio C++ engine to build to il2cpp. Unity could make it more explicit (especially in the manual) about what is required.