Problem compiling 4.15 C++ projects with VS2015

I’m getting problems compiling C++ projects in 4.15 with VS2015 v3 where, when errors are removed they will only compile properly using Rebuild (taking considerably longer) – just using build does not compile. Alternatively compiling from the Editor does work.

I am not getting this problem using 4.14.

I tested this using empty projects.
I am running Windows 10 with projects from the launcher.

Hi

  1. I first made a 4.15 blank C++ project
  2. Introduced an error by typing a pair of curly braces in the only .cpp
  3. Tried to compile by hitting build which of course it doesn’t (missing function…
  4. Removed the brackets and again hit build which it should but doesn’t
  5. Hitting recompile does work.

In both above cases I can compile by hitting the compile button in Editor.

This does not happen in 4.14.

Hey mojay-

What are the errors you’re getting when you attempt to compile? It sounds like the affected project was converted from 4.14 to 4.15, do you get the same errors in a new 4.15 project? If so, can you provide the setup steps/instructions so that I can match your setup locally?

Hitting Build after removing the brackets gives:

1>------ Build started: Project: Test1, Configuration: Development_Editor x64 ------
1>  Compiling game modules for hot reload
1>  Performing 3 actions (2 in parallel)
1>  Test1.cpp
1>  [2/3] Link UE4Editor-Test1-7626.dll
1>  [3/3] Link UE4Editor-Test1-1260.lib
1>     Creating library C:\Users\M\Documents\Unreal Projects\Test1\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test1-7626.lib and object C:\Users\M\Documents\Unreal Projects\Test1\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test1-7626.exp
1>     Creating library C:\Users\M\Documents\Unreal Projects\Test1\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test1-7626.suppressed.lib and object C:\Users\M\Documents\Unreal Projects\Test1\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test1-7626.suppressed.exp
1>ERROR : UBT error : Failed to produce item: C:\Users\M\Documents\Unreal Projects\Test1\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test1-1260.lib
1>  Total build time: 2.71 seconds (Local executor: 0.00 seconds)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat" Test1Editor Win64 Development "C:\Users\M\Documents\Unreal Projects\Test1\Test1.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Can you provide the full error when it fails to compile the second time (after removing the brackets). When I follow these steps in a new 4.15 project locally I am able to compile the second time after step 4. The error your seeing may help me determine what exactly is happening on your end.

I have the same problem in 4.15 with a project migrated from 4.14.3.

Yeah Bytecode Bits, that’s how I came across this. We’ll see if comes back with any suggestions.

Hey guys,

I tested again and still not getting the same compile failure. Can you check if the projects you’ve tried have any plugins turned on? Additionally, do you get the same compile errors if you try to compile with the project closed (not preform a hot reload)?

There are no plugins other than built in, and the file compiles fine from the editor (vs closed).

After further testing, what you’re seeing is the result of an issue that is currently being investigated. The compile is still completing (you can see the “Hot Reload Complete” message inside the editor) even though VS is reporting an error. This seems to be caused by .dll files in the project’s Intermediate folder. Because this is related to hot reload, you can avoid this completely by closing the project before compiling from Visual Studio.

Cheers

Thanks

Thank you!

thank you for reporting this. Its been driving me insane - I wasted a full two days trying to figure this out. I can confirm that it happens in 4.15 (release) and visual studio update 3 (current hot fixes). Even in a new blank C++ project, after compiling with visual studio the second time. (add spaces to a new class to force it to compile)… Closing the editor, disables the hot reload and the error goes away. Very annoying.

@
I am still running into this issue in 15.1

I had this issue 4.15. but It was resolved for me in 4.15.1

Hi, Iam usign fresh 4.15.3 now and still have this hot reload issue. Only closing editor before compiling in VS solve the problem. When this will work? Its really bothering stuff…

I had it, I did full project clear: binaries, saved, intermediate. Basically, only content and source left, and all compile issues gone. Make a copy of a project and try clearing.