Visual studio fails to compile and connect to UE4 properly

Hello,
Just started to connect UE4 with VS2013 Ultimate and it’s not working :frowning:

I’m trying to do the Hello World tutorial from here

Upon creating new C++ project (instead of blueprint) I get the following message:

The project failed to compile with
this version of the engine. Would you
like to open the project in Visual
Studio?

The following log is showing upon selecting show log:

The project failed to compile with this version of the engine. Build output is as follows:

> Running C:/Program Files/Epic
> Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe
> test4 Development Win64
> -project="E:/UE4 projects/test4/test4.uproject" -rocket
> -editorrecompile -progress Parsing headers for test4Editor Reflection
> code generated for test4Editor
> Performing 7 actions (4 in parallel)
> [3/7] Resource test4.rc [2/7] Resource
> ModuleVersionResource.rc.inl
> C:\Program Files\Epic
> Games\4.7\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3)
> : fatal error RC1015: cannot open
> include file 'windows.h'.
> 
> E:\UE4
> projects\test4\Source\test4\Resources\Windows\test4.rc(8)
> : fatal error RC1015: cannot open
> include file 'windows.h'.
> 
> PCH.test4.test4.h.cpp C:\Program
> Files\Epic
> Games\4.7\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(5)
> : fatal error C1083: Cannot open
> include file: 'new': No such file or
> directory
> -------- End Detailed Actions Stats ----------------------------------------------------------- ERROR: UBT ERROR: Failed to produce
> item: E:\UE4
> projects\test4\Binaries\Win64\UE4Editor-test4.dll
> Cumulative action seconds (4
> processors): 0.00 building projects,
> 0.56 compiling, 0.00 creating app bundles, 0.00 generating debug info,
> 0.00 linking, 0.00 other UBT execution time: 10.73 seconds

I’ve acted as instructed in here and at the Set the Startup Project step I have no project types to choose from.

Working with VS2013 ultimate and UE 4.7.0 preview 8.

Please help.

Hey Archonite-

The RC1015 and C1083 errors typically appear when there is a problem finding the Windows SDK. If you don’t already have it on your computer you can download the Windows SDK here: http://www.microsoft.com/en-us/download/details.aspx?id=8279

If you’re building from source code, make sure that the dependencies are installed correctly (by running the Setup.bat file). Also check anti-virus software to make sure it’s not blocking anything.

Cheers

I’ve put out this question also here: with updated info about this mess.

The SDK didn’t solve this and there are still problems.
As of now I cannot build C++ projects with VS2013 ultimate on 4.7 but can on 4.6.1. I believe the fault is on the UE side rather than mine.

What is the solution configuration and solution platform you’re using in Visual Studio? The first time a new code based project is built in VS you should use the “Development Editor” solution configuration and “Windows” as the solution platform. If you do not see the white boxes in the top center of the screen you can click the drop down arrow to add/remove buttons and add them from the menu.

VS fires up after I get the errors that the project could not be built (from the launcher) and when I close the project and try to re-open it fails again and prompt to enter VS and build it manually (it won’t even try to start VS for me).
In VS the defaults are Development Editor and Windows and I still get the following error at the output window:

1>------ Build started: Project: blank, Configuration: Development_Editor x64 ------
1>  Performing 7 actions (4 in parallel)
1>  [2/7] Resource ModuleVersionResource.rc.inl
1>  [3/7] Resource blank.rc
1>  PCH.blank.blank.h.cpp
1>E:\UE4 projects\blank\Source\blank\Resources\Windows\blank.rc(8): fatal error RC1015: cannot open include file 'windows.h'.
1>  
1>C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3): fatal error RC1015: cannot open include file 'windows.h'.
1>  
1>C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(5): fatal error C1083: Cannot open include file: 'new': No such file or directory
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: E:\UE4 projects\blank\Binaries\Win64\UE4Editor-blank.dll
1>  Cumulative action seconds (4 processors): 0.00 building projects, 0.32 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
1>  UBT execution time: 4.30 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" blankEditor Win64 Development "E:\UE4 projects\blank\blank.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have varified the engine and no issues were detected. I tried to make a C++ project with UE 4.6.1 and while I’m not sure why the build was not successful since I just hit build when it was loaded, the project files were created successfully with no error messeges popping up.

Just to make sure I understand the steps you’re taking, you select which engine version you want from the launcher and then choose to create a new code project when the project selection menu appears. After selecting a code project and giving it a name you click Create Project. Then you receive the error message stating that the project failed to compile and does not open in Visual Studio.

If this is the case and attempting to Verify the build version didn’t work, you may need to uninstall and reinstall the preview version, then try creating a code project.

The code does open in VS after it asks me if I want to try to open it anyways to try to build manually.

I’ll re-install 4.7 but similar errors happen to me with 4.6.1 too. It compiles the solution successfully but when I try to build it the same errors happen again.

I’ve installed VS2013 pro (after uninstalling ult) and UE4.7 and the same problem still persist. How can I wipe-clean VS from my computer and try again? I don’t know what to do anymore :frowning:

Problem solved! My Windows user-name was in non-english characters and changing just the log-on name and having all the paths for the project and installations in english is not enough. So I made a new user and now it works.

I hope that by EU5 it will be more tolerant to non-english characters in the system.

Thank you for your help and I hope that other people who got stuck like me for this stupid reason will find this thread and solve their problem with less agony.