Cross compiling for Windows on Linux and OS X

Hi,

Unfortunately whilst it is theoretically possible to cross compile for windows using mingw there are going to be many issues for it to work reliably to package a game in UE4. One issue would be the path mingw would take during compiliation would be completely untested and different from the Windows on Windows builds. The second major issue is that during packaging for Windows the shaders for example need to be pre-compiled for DirectX and other Windows only tools need to be run.

Microsoft has been releasing some tools as open source such as a new shader compiler built on clang/llvm, so there is hope for the future. However if you are feeling adventurous there are two main ways you could compile and package for windows from the Linux editor:

  1. Download the Visual Studio Command Line tools and SDK using wine and then append wine to the invocation of UBT.
  2. Run Windows inside a VM or second machine and remotely compile.

I am unsure if the remote build support to Windows is enabled in UE4 on Linux but this is the method I would currently suggest to be the most stable and produce the most reliable builds.