Can't compile to Win32 version

I am stuck. I have clean empty project in Unreal Engine 4.15, even without Starter Content. When I have it without Visual Studio C++ project (no C++ classes included), it can be compiled to Win32 version. When I add any MyActor C++ class, I get this as an output:

UATHelper: Packaging (Windows (32-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (32-bit)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject="C:/UE4 Projects/MyProject/MyProject.uproject" BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project="C:/UE4 Projects/MyProject/MyProject.uproject" -cook -stage -archive -archivedirectory=C:/Users/cheshire -package -clientconfig=Develop
ment -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win32 -build -CrashReporter -utf8output
UATHelper: Packaging (Windows (32-bit)): Automation.Process: Setting up command environment.
UATHelper: Packaging (Windows (32-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for C:\UE4 Projects\MyProject\MyProject.uproject
UATHelper: Packaging (Windows (32-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (32-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe MyProject Win32 Development -Project="C:\UE4 Projects\MyProject\MyProject.uproject"  "C:\UE4 Projects\MyProject\MyProject.uproject"  -remoteini="C:\UE4 Projects\MyProject" -noxge -generatemanifest -NoHotReload
UATHelper: Packaging (Windows (32-bit)): UnrealBuildTool: Performing full C++ include scan (building a new target)
UATHelper: Packaging (Windows (32-bit)): CommandUtils.Run: Run: Took 1.1355187s to run UnrealBuildTool.exe, ExitCode=0
UATHelper: Packaging (Windows (32-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe MyProject Win32 Development -Project="C:\UE4 Projects\MyProject\MyProject.uproject"  "C:\UE4 Projects\MyProject\MyProject.uproject"  -remoteini="C:\UE4 Projects\MyProject" -noxge -NoHotReload -ignorejunk
UATHelper: Packaging (Windows (32-bit)): UnrealBuildTool: Performing 7 actions (4 in parallel)
UATHelper: Packaging (Windows (32-bit)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\UE4 Projects\MyProject\Binaries\Win32\MyProject.exe
UATHelper: Packaging (Windows (32-bit)): UnrealBuildTool: Total build time: 2.04 seconds (Local executor: 0.00 seconds)
UATHelper: Packaging (Windows (32-bit)): CommandUtils.Run: Run: Took 2.3557625s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (32-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe MyProject Win32 Development -Project="C:\UE4 Projects\MyProject\MyProject.uproject"  "C:\UE4 Proje
cts\MyProject\MyProject.uproject"  -remoteini="C:\UE4 Projects\MyProject" -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2017.04.18-21.07.13.txt' 
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictio
nary`2 InTargetToManifest)
UATHelper: Packaging (Windows (32-bit)):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
UATHelper: Packaging (Windows (32-bit)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
UATHelper: Packaging (Windows (32-bit)):    at BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Program.Main()
UATHelper: Packaging (Windows (32-bit)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (32-bit)): BUILD FAILED

I looked three times not to get Development Editor or Debug Editor build in Visual Studio - there were topics about that Editor is only in 64 bit. When I try to compile it in Visual Studio, I get this:

…and yeah, it happened I have to develop for 32bit Windows 7 platform. FML apparently. (for 64bit everything works)

Not really because it’s Windows 7, but thanks.

The editor itself can only be built for Win64. However, this might be handy for you: Compiling Game Projects | Unreal Engine Documentation

Derp, I linked to the wrong thing. Here is what I meant to link to: Compiling Game Projects | Unreal Engine Documentation

So your game project can be Win32. It’s just the editor itself that has a 64bit requirement.

I know it can. It just doesn’t want to, and I’m trying to figure out why.

Turns out that I had to reinstall - or really, update - my Visual Studio 2017 to be able to do this stuff. I don’t know really which step helped, so I can’t tell it in terms of working solution - I have installed multiple VS crossplatform tools (for x86 platforms), even CLANG (outside the Visual Studio), in the meantime I had even to re-download Epic Launcher and UE4.15 because somehow it was deleted from my installed programs. But it helped - now I am able to compile for Win32 platform.