Download

Build Error MSB3037

(I’ve asked this question on the UE AnswerHub, but it’s sat for a while and hasn’t received even a comment, so I figured I’d ask here and cover all my bases.)

I’m trying to build my Visual Studio project. It builds fine, until I create a public UPaperSpriteComponent variable. Then when I try to build it says 1 failed and gives me this error:


ERROR : UBT error : Failed to produce item: ...\MyFirst2DGame\Binaries\Win64\UE4Editor-MyFirst2DGame.pdb
 Cumulative action seconds (4 processors): 0.00 building projects, 69.87 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
 UBT execution time: 43.14 seconds
 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""D:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" MyFirst2DGameEditor Win64 Development "...\MyFirst2DGame\MyFirst2DGame.uproject" -rocket" exited with code -1.

I’ve done some googling, and it seems the solution to this issue is to reinstall DirectX. However, I’m unsure which version/type I should reinstall. I’ve already tried reinstalling DX_SDK_Jun10 to no avail.

How do I resolve this issue with building my project? Any help would be appreciated :slight_smile:

It’s really hard to say what could be causing this with out more info. Are there any other error messages generated? Are you getting any squiggly lines from Intelesense?

Check that you’ve got all the headers you need to include included and that you’ve added all the modules you need in your Build.cs. If it only doesn’t build then you add a variable of that type I would say that’s probably the problem.

Failing that please post the source code of the problem file.

Okay, after looking through some tutorials, it seems like Error MSB3037 is pretty generic. I scrolled up a little and found the true error to be this:


...\unreal projects\myfirst2dgame\source\myfirst2dgame\MyFirstBlueprintFunctionLibrary.h(5): fatal error C1083: Cannot open include file: 'PaperSpriteComponent.h': No such file or directory

The #include section of MyFirstBlueprintFunctionLibrary.h goes:


#include "PaperSpriteComponent.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyFirstBlueprintFunctionLibrary.generated.h"

There is a PaperSpriteComponent.h in the Unreal Engine source. Its path is this in the solution explorer:
Engine\UE4\Plugins\2D\Paper2D\Source\Paper2D\Classes\PaperSpriteComponent.h

I’m a bit rusty on my C++ (I know it, for the past couple years I’ve worked in Java), so I’m unsure on what to do next. How do I change my #include to point to the correct location of PaperSpriteComponent.h?

Hi Chuck,

Make sure you’ve added the Paper2D module to your build.cs file under private dependency modules. Then right click your .uproject file in the file explorer and select generate project files. This will update your include directories to include the files under the Paper2D module.

This is something more specific to UE4 than C++.

Oh yep, that did it. It works now. Thanks for your help! :slight_smile: