Download

4.21: Cross compile for Linux under Win doesn’t work (InputCoreTypes.generated.h file not found)

Hello guys!

It seems to be impossible for me to package a project for Linux under Windows with UE 4.21. Do I make something wrong or is this a general issue?

Here are the steps to reproduce:

  1. Install UE 4.21.2 via the Epic Games Launcher and add linux platform support within the options. (I used “Verify” to check my installation.)
  2. Install Clang 6.0.1 according to docs.unrealengine.com/en-us/Platforms/Linux/GettingStarted, notice section “Troubleshooting”.
  3. Start the engine and create the new C++ project “Basic Code” without starter content.
  4. The solution file is automatically generated. Start it (I use VS Community 2017), set “Development Editor” and “Linux”, and build your project.

The error message says


C:/Program Files/Epic Games/UE_4.21/Engine/Source/Runtime/InputCore/Classes\InputCoreTypes.h(10,10): fatal error : 'InputCoreTypes.generated.h' file not found

Same problem when trying to package the game for Linux and when trying to package with engine version build from source.

So, any suggestions or hints?

So here is the solution, for anybody who is interested. In fact, there were two problems. Most important, it is indeed not possible to crosscompile your project for Linux with VS. No idea how you are supposed to do it.

Furthermore, my own project couldn’t be packaged because of an error or an insufficiency of clang, while everything compiled and packaged well for Windows. Clang crashed without a meaningful error message and I thus couldn’t recognize the problem. That is, this was a very special issue that I could solve by adjusting my source code.

Normally you are able to package for Linux.