I've tried to generate a new UE4 Project (C++/Third Person) but I always get the following error
The project could not be compiled. Would you like to open it in Visual Studio?
Running C:/Program Files/Epic Games/UE_4.17/Engine/Binaries/DotNET/UnrealBuildTool.exe AnotherWorld Development Win64 -project="C:/Users/Paul/Documents/Unreal Projects/AnotherWorld/AnotherWorld.uproject" -editorrecompile -progress -NoHotReloadFromIDE
Creating makefile for AnotherWorld (no existing makefile)
Performing full C++ include scan (no include cache file)
#progress push 5%
Parsing headers for AnotherWorldEditor
Running UnrealHeaderTool "C:\Users\Paul\Documents\Unreal Projects\AnotherWorld\AnotherWorld.uproject" "C:\Users\Paul\Documents\Unreal Projects\AnotherWorld\Intermediate\Build\Win64\AnotherWorldEditor\Development\AnotherWorldEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for AnotherWorldEditor in 18,9575823 seconds
#progress pop
Performing 11 actions (2 in parallel)
[2/11] Resource ModuleVersionResource.rc.inl
[3/11] Resource PCLaunch.rc
SharedPCH.Engine.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\INCLUDE\cstddef(5): fatal error C1083: file (Include) could not be opened: "stddef.h": No such file or directory
ERROR: UBT ERROR: Failed to produce item: C:\Users\Paul\Documents\Unreal Projects\AnotherWorld\Binaries\Win64\UE4Editor-AnotherWorld.dll
Total build time: 42,13 seconds (Local executor: 0,00 seconds)
How can I fix this error?
I know this is an old question, but I thought I'd toss in my answer for anyone who stumbles across it.
You might be experiencing the same issue I had, that is, I was missing the UCRT SDK. When you are Modifying your VS install from the Visual Studio Installer, be sure you install the Windows Universal CRT SDK along with which ever version of Windows SDK you are using. In my case, I only had Windows 8.1 SDK component and was receiving the same error.
Once you have the Windows Universal CRT SDK installed, try making a new project with the same settings. Your old projects will not build for what I assume is a problem with the solution properties not including the new ucrt include path.
Related
An error occurred while trying to generate project files.
Running D:/DevOps/UE_4.26/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="D:/DevOps/Unreal_Projects_4.26/MyProject1/MyProject1.uproject" -game -rocket -progress
Discovering modules, targets and source code for project...
ERROR: Unable to find path to the Windows resource compiler under C:\Program Files (x86)\Windows Kits\10 (version 10.0.18362.0)
VS 2017 installation helped me
I am trying to generate a CMake project from Visual Studio 2019 to compile on a Linux remote machine. I defined the remote machine at the CMakeSettings.json. The CMake generation is going well, but just right when it is finished it rises the following error:
Extracted includes paths.
Extracted CMake variables.
Extracted source files and headers.
**Error: CMake file API parsing response files failed.**
I'm running the Visual Studio from my Windows 10 computer.
The odd thing is that when I am trying to generate the same project from another Windows 7 computer the CMake generation finishes fine.
Any Ideas?
The error you are seeing is similar to the errors mentioned in a Visual Studio 2019 bug here, related to CMake cache:
“The cache for the current configuration could not be opened. See the
Error List for details.”
[...]
1> CMake generation started for configuration: ‘MakeWin’.
1> Error: CMake file API response index file not found
This was reported in VS 2019 Version 16.0.
Microsoft released a fix for this issue, I believe in Version 16.2.1. If you upgrade your VS 2019 to the latest version, it may resolve the error you are seeing.
I have been having this a problem when loading up a "Basic C++ Code Project" and have had absolutely no success due to lack of information.
The error is as follows:
Running E:/Program Files/Epic Games/UE_4.22/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Win64 -Project="D:/[My-User]/Documents/Code/[Project Root Dir]/[Project]/[Project].uproject" -TargetType=Editor -Progress -NoHotReloadFromIDE
Creating makefile for [Project]Editor (no existing makefile)
#progress push 5%
Parsing headers for [Project]Editor
Running UnrealHeaderTool "D:\[My-User]\Documents\Code\[Project Root Dir]\[Project]\[Project].uproject" "D:\[My-User]\Documents\Code\[Project Root Dir]\[Project]\Intermediate\Build\Win64\[Project]Editor\Development\[Project]Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for [Project]Editor in 8.2032876 seconds
#progress pop
Using Visual Studio 2017 14.16.27023 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
ERROR: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at UnrealBuildTool.XGE.ExecuteTaskFile(String TaskFilePath, DataReceivedEventHandler OutputEventHandler, Int32 ActionCount) in D:\Build\++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Executors\XGE.cs:line 493
If there is any more information relating to this problem I am happy to provide it.
There could be something wrong with your installation of visual studio. Check your Visual Studio installer and ensure that the Game development with C++ workload is ticked. I typically also install the .NET Framework 4.6.2 SDK and targeting pack under the individual components list.
In your case it seems to be looking for Visual Studio 2017, so try the steps above with 2017 first.
I had similar problem after my pc shutdown
after backing up everything I removed all folders except source, content and config than generated virtual studio files using .uproject
problem solved :)
I figured out the issue. It didn't like using UE 4.22.3 for some reason...
Thanks for the help guys!
I'm trying to compile my C++ CMake project in Visual Studio. However, I'm getting the following error message:
#error: "No Target Architecture" C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CMakeLists.txt C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winnt.h 154
I checked my code and I'm never including winnt.h but I'm including windows.h so this rules out the solution of never including winnt.h.
This is the winnt.h code snippet where it throws the error:
//
// TODO: WOWXX - Unblock ARM. Make all alignment checks DWORD for now.
//
#define PROBE_ALIGNMENT( _s ) TYPE_ALIGNMENT( DWORD )
#elif !defined(RC_INVOKED)
#error "No Target Architecture"
#endif
I've previously successfully compiled this project using MinGW and WSL (Windows Subsystem for Linux) outside of Visual Studio. How do I tell Visual Studio that my architecture is 64-bit and amd64 (?). What is necessary in addition to make it compile? The run configuration is set to x64-Debug. Including stdafx.h is not possible since the header file is not found. I'm also using Boost but that is resolved properly by adding the following line to my CMakeLists.txt:
set(BOOST_ROOT "C:/local/boost_1_69_0_b1_rc3")
Since the error message mentioned a file of mine (e.g. file_operations.h) I decided to define the architecture inside it using the following macro:
#define _AMD64_ 1
This fixed the problem but I believe that a "better" solution exists by configuring the CMakeLists.txt or Visual Studio.
I think this should be fixed by -DCMAKE_GENERATOR_PLATFORM=x64
It is not specified if the error happens when the project is being configured or when the project has been configured and you are trying to build.
It could be an issue with your Visual Studio installation as it seems like you are not using cmake at the command line but using the cmake built into Visual Studio.
In both cases cmake will run to verify that a valid program can be built.
In Visual Studio create a new CMake project and it will create a generic c++ project with a CMakeLists.txt file. When you build this project it will run through the compiler detection phase, project configuration, and build. On my system this defaults for x86-Debug switch this to x64-Debug and it will go through the process again for x64 architecture.
Personally I think that the bundled CMake interface is very confusing and I don't use it. It is also using an older CMake and Ninja tools.
If this all works then it is something else that is going wrong and you need to include the full error message. The full error message will show the chain of include files and may pinpoint if you are using the wrong windows header file.
Hello I wanted to create a project in UE4.10 with basic c++ code. But when it comes to create it, UE gives me an error:
The project could not be compiled. Would you like to open it in Visual Studio? Running E:/Program Files (x86)/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project="C:/Users/allst/Documents/Unreal Projects/MyProject/MyProject.uproject" -rocket -editorrecompile -progress -noubtmakefiles -2015 #progress push 5% Parsing headers for MyProjectEditor Running UnrealHeaderTool "C:/Users/allst/Documents/Unreal Projects/MyProject/MyProject.uproject" "C:\Users\allst\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed Reflection code generated for MyProjectEditor in 17,8672852 seconds #progress pop Performing 7 actions (2 in parallel) [2/7] Resource PCLaunch.rc E:\Program Files (x86)\Epic Games\4.10\Engine\Source\Runtime\Launch\Resources\Windows\PCLaunch.rc(10) : fatal error RC1015: cannot open include file 'windows.h'. [3/7] Resource ModuleVersionResource.rc.inl E:\Program Files (x86)\Epic Games\4.10\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3) : fatal error RC1015: cannot open include file 'windows.h'. PCH.MyProject.h.cpp E:\Program Files (x86)\Epic Games\4.10\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: C:\Users\allst\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject.dll Total build time: 90,64 seconds
I had VS 2013 pro, but I was asked to install VS 2015 community, what I have done, but problem is still persisting. Have you any ideas what should be done now? I will be gratefull for any advice. Have a nice day!
Please verify that "Common Tools for Visual C++ 2015" was selected when installing Visual Studio 2015. It will not automatically install, you need to do a custom install for that.
It appear to be a known problem while running Unreal Engine prior to 4.12.5 with Visual Studio Community 2015 with Update 3.
Assuming that you already have Common Tools for Visual C++ 2015 installed.
You can check if you are running VS2015 with Update 3 by going to:
Visual Studio 2015 > Help > About Microsoft Visual Studio
Solution 1: Update Unreal Engine > 4.12.5
Updating your Unreal Engine to version above 4.12.5
Go to
Epic Game launcher > Unreal Engine > Library > Engine Version to update the engine.
Solution 2: Resintall VS2015 without Update 3
Follow the instruction from Infected_Post here.
Below is what he has posted:
Completely uninstall visual studio
Use the Extra visual studio uninstall cleaner. Found on
github > Microsoft/VisualStudioUninstaller/releases
Delete the remaining Visual Studio installation folder.
Do a restart and this machine should be ready for a clean installation
Download the Visual Studio 2015 installer without any updates: https://www.microsoft.com/en-us/download/details.aspx?id=48146
Now make sure you do a custom installation and deselect update 3!!!
Once the installation is finished you need to generate visual studio project files for your unreal projects.