Blank C++ project won't build (4.12.3)

I create a new project and when making it I received a notice that the project was unable to produce the .dll. I elected to open the C++ project in visual studio following prompts. When attempting to simply rebuild the solution I recieved these errors

Error C4599 ‘/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE’: command line argument number 261 does not match precompiled header UniversalInventory D:\Unreal Projects\universalInventory\UniversalInventory\Intermediate\Build\Win64\UE4Editor\Inc\UniversalInventory\UniversalInventory.generated.cpp 1

Error C4599 ‘/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE’: command line argument number 261 does not match precompiled header UniversalInventory D:\Unreal Projects\universalInventory\UniversalInventory\Source\UniversalInventory\UniversalInventoryGameMode.cpp 1

Error C4599 ‘/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE’: command line argument number 261 does not match precompiled header UniversalInventory D:\Unreal Projects\universalInventory\UniversalInventory\Source\UniversalInventory\UniversalInventory.cpp 1

Error Failed to produce item: D:\Unreal Projects\universalInventory\UniversalInventory\Binaries\Win64\UE4Editor-UniversalInventory-396.dll UniversalInventory D:\Unreal Projects\universalInventory\UniversalInventory\Intermediate\ProjectFiles\ERROR 1

Error MSB3073 The command ““D:\Epic Games\4.12\Engine\Build\BatchFiles\Rebuild.bat” UniversalInventoryEditor Win64 Development “D:\Unreal Projects\universalInventory\UniversalInventory\UniversalInventory.uproject” -waitmutex” exited with code -1. UniversalInventory C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 46

After searching here I am not quite finding anything related.

Have you tried rebuilding your project?

[edit: This may or may not work depending on ones particular situation. All the files and folders deleted in step 1 will be regenerated anew, so if one of them had been corrupted for whatever reason and is causing a problem this is a quick way of making everything clean again. This probably should be the first thing you try before anything else.
Also, it’s wise to use some form of version control (like git for instance), that way in the worst case scenario you can always revert back to your previous working build.]

  1. Go to your folder and delete the .vs folder, Binaries folder, Build folder, Intermediate folder, Saved folder, the .sln file and .db file.
  2. Double-Click on your .uproject file and click ‘Yes’ to rebuilding the missing modules.
  3. Once the engine is open and all the stuff has been rebuilt, Right-Click your .uproject file and select ‘Generate Visual Studio project files’.
  4. Double-Click your .sln file to open Visual Studio which will then rebuild itself.

You can get more information with this post : Unreal Error "This project could not be compiled. Would you like to open it in Visual Studio?" - C++ - Epic Developer Community Forums

Hi, I tried this, but that broke my project :confused: He can’t rebuild… I hope my project isn’t definitely break :confused:

I found the solution ! Read the post of here (Build Failed with VS 2015 update 3 - Programming & Scripting - Epic Developer Community Forums)

post :

Hi everyone,

I just wanted to pop in here real quick to let you know that we do not yet officially support Update 3 for Visual >Studio. Our goal is to have support for new VS updates by the time they are officially released (Release Candidate >versions are not official final release versions). Sometimes we are able to get that support into the Engine early, but >as of right now it is not in place.

I brought this up with the individual who will be responsible for making sure support for Update 3 is added to the >Engine. He has not done any testing on this yet, but he believes it should be possible to correct this issue by >opening the WindowsPlatformCompilerSetup.h file in source code (this won’t correct it for the binary version of the >Engine, unfortunately), and remove 4599 from the table of warnings at the top. Then add #pragma warning(disable : >4599) below the list. It is possible that this may not work since the warning is coming from command line arguments >instead of source, but it’s the first thing he is going to try when he starts working on support for Update 3. He also >said that he does not believe this edit will have any adverse affect on your game code generation, but stressed >again that he has not done any testing yet.

For now we recommend sticking with Visual Studio 2015 Update 2.

This worked for me, i hope for you too.

This will not resolve the problem, the new VS2015 update 3 has issues with UE4. But you can try, if the method doesn’t work for you.

After unsuccessful attempts to use #pragma went to reinstall Visual Studio :frowning:

And irritatingly it would appear that one can’t download any previous versions either. I discovered that the hard way. Looks like no C++ projects from me until this is fixed. :confused:

I am marking this as the solution only because it worked for me. I realize it may not be a solution for everyone.

Some useful information for my setup:
Development Platform: Windows 7
Engine Version: 4.12.3
VS: Community 2015

Make sure that you setup the disable as “#pragma warning(disable : 4599)” without the > symbol as stated above or you’ll have problems.

thankfully I checked the original post.

Yes sorry, check the original post is better !

I keep my projects on Github and sometimes have to revert to previous builds or rebuild broken projects. This is step by step what I was shown to do and it works for me.
There is nothing that I mentioned to delete that you can’t get back by following the steps I mentioned. If your project is broken it’s not because of doing the things in the above post.

You can down load previous versions. I just today 06/28 downloaded VS2013. On the download page there’s a link on the left menu for it. Download Visual Studio Tools - Install Free for Windows, Mac, Linux

Unreal is now only compatible with VS 2015. As of very 4.11 I believe.

The problem was (again) VS2015 update 3, i resolved it and the project build without issues. I knew there was no chance that it broke my project, I often do your manipulation to remove a C ++ class, but with the problem of VS2015 u3, I thought I would never be able to rebuild my project normally ^^

I thought you might have down voted my comment. Down voting just because it didn’t bear fruit in your particular case isn’t a good way of encouraging people to help.

Thanks man, omg, i can’t believe that worked. YOU SAVED MY ■■■ <3

Worked for me also. Thank you for the re-post.

When will this be up and running?