UBT is in a strange state. I started seeing this problem with another project, so I created a clean First Person C++ project and am seeing the same thing. My setup is:
- Visual Studio 2013
- Unreal Engine 4.3 Source code checked out with GIT
I built the project and everything built fine with no errors. When the build finishes, I select build again (without making any other changes) and it builds the .cpp files in the Games folder again.
I can start the editor in the debugger and set breakpoints in the game files (GameMode, Character, etc) and they work. I then exit the editor, make a simple change (auto x = 3;) to GameMode::GameMode(), set a breakpoint on the new line and hit F5 to compile and start the debugger. When the editor launches, the breakpoint is never triggered and checking the editor window, the breakpoint is grayed out, suggestion the source and the game dll don’t match.
I’ve checked all the usual suspects, have lot’s of free disk space. Git shows that I haven’t made any changes to the source files, I’m baffled at this point, since this problem just started in the past 24 hours.
Anyone have any suggestons on how to debug this problem? How can I enable logging in UBT to see why it’s rebuilding these files and not reporting any errors? I’m not sure what else to try, short of reinstalling the source code and trying a clean install.
Update
Not sure how I missed this before, but when I run UBT as the startup project, I get several compile errors. But when I set the startup project to my game project, the compile errors are not there. This is still very strange as I use to get the compile errors in the Game Build. My non-UE4 projects are showing compile errors, so this is something related to UBT.
Output from UBT project is set as startup and run
Performing 10 actions (max 4 parallel jobs)
NewCouplingGameMode.cpp
NewCouplingCharacter.cpp
PCH.Coupling.CouplingPrivatePCH.h.cpp
NewCouplingHUD.cpp
NewCouplingProjectile.cpp
NewCoupling.cpp
d:\unreal\projects\research\newcoupling\plugins\coupling\source\coupling\public\V8Engine.h(43) : error C2143: syntax err
or : missing ';' before '<'
d:\unreal\projects\research\newcoupling\plugins\coupling\source\coupling\public\V8Engine.h(43) : error C4430: missing ty
pe specifier - int assumed. Note: C++ does not support default-int
d:\unreal\projects\research\newcoupling\plugins\coupling\source\coupling\public\V8Engine.h(44) : error C2334: unexpected
token(s) preceding '{'; skipping apparent function body
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: D:\Unreal\Projects\Research\NewCoupling\Plugins\Coupling\Binaries\Win64\UE4Edi
tor-Coupling-Win64-DebugGame.pdb
Cumulative action seconds (8 processors): 0.00 building projects, 4.84 compiling, 0.00 creating app bundles, 0.00 genera
ting debug info, 0.00 linking, 0.00 other
UBT execution time: 61.26 seconds
Output when NewCoupling2 project is set as startup and Build > Compile (F7) is clicked. Notice the lack of errors following NewCoupling2.cpp:
20> Performing 6 actions (max 4 parallel jobs)
20> NewCoupling2GameMode.cpp
20> NewCoupling2HUD.cpp
20> NewCoupling2Projectile.cpp
20> NewCoupling2Character.cpp
20> NewCoupling2.cpp
20> [6/6] link.exe UE4Editor-NewCoupling2-Win64-DebugGame.dll
20> Creating library D:\Unreal\Projects\Research\NewCoupling2\Intermediate\Build\Win64\NewCoupling2Editor\DebugGame\UE4Editor-NewCoupling2-Win64-DebugGame.lib and object D:\Unreal\Projects\Research\NewCoupling2\Intermediate\Build\Win64\NewCoupling2Editor\DebugGame\UE4Editor-NewCoupling2-Win64-DebugGame.exp
20> -------- End Detailed Actions Stats -----------------------------------------------------------
20> Cumulative action seconds (8 processors): 0.00 building projects, 1.93 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.69 linking, 0.00 other
20> UBT execution time: 19.73 seconds
28> Target is up to date.
========== Build: 2 succeeded, 0 failed, 1 up-to-date, 30 skipped ==========