Download

can't create and compile new C++ project

I have created new project with Visual Studio 2017 in Unreal 4.16.0. But the project can’t create and I see this error. Please help me


Running C:/Program Files/Epic Games/UE_4.16/Engine/Binaries/DotNET/UnrealBuildTool.exe CardboardVRMovie Development Win64 -project="C:/Users/user/Documents/Unreal Projects/VR/CardboardVRMovie/CardboardVRMovie.uproject" -editorrecompile -progress -NoHotReloadFromIDE
Performing full C++ include scan (building a new target)
Creating makefile for CardboardVRMovie (no existing makefile)
 @progress push 5%
Parsing headers for CardboardVRMovieEditor
  Running UnrealHeaderTool "C:\Users\user\Documents\Unreal Projects\VR\CardboardVRMovie\CardboardVRMovie.uproject" "C:\Users\user\Documents\Unreal Projects\VR\CardboardVRMovie\Intermediate\Build\Win64\CardboardVRMovieEditor\Development\CardboardVRMovieEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for CardboardVRMovieEditor in 12.8578104 seconds
 @progress pop
Performing 8 actions (4 in parallel)
[2/8] Resource ModuleVersionResource.rc.inl
[3/8] Resource PCLaunch.rc
SharedPCH.Engine.cpp
CardboardVRMovie.cpp
CardboardVRMovieGameModeBase.cpp
CardboardVRMovie.generated.cpp
[7/8] Link UE4Editor-CardboardVRMovie.dll
[8/8] Link UE4Editor-CardboardVRMovie.lib
   Creating library C:\Users\user\Documents\Unreal Projects\VR\CardboardVRMovie\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-CardboardVRMovie.lib and object C:\Users\user\Documents\Unreal Projects\VR\CardboardVRMovie\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-CardboardVRMovie.exp
LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'
ERROR: UBT ERROR: Failed to produce item: C:\Users\user\Documents\Unreal Projects\VR\CardboardVRMovie\Binaries\Win64\UE4Editor-CardboardVRMovie.dll
Total build time: 111.40 seconds (Local executor: 0.00 seconds)




The build from Visual Studio (VS) sometimes (often!) fails when the UE editor is open since 4.16. Please close the UE Editor when building from VS or use the Compile button from the UE Editor.

Hi I’m having the same issue. Just downloaded UE 4.16.1 and created a new C++ project. The progress bar gets to about 60%-ish on the “Compiling C++ code” section and then I’m presented with 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.16/Engine/Binaries/DotNET/UnrealBuildTool.exe Climb3 Development Win64 -project="A:/Developer/Climb3/Climb3.uproject" -editorrecompile -progress -NoHotReloadFromIDE
Performing full C++ include scan (building a new target)
Creating makefile for Climb3 (no existing makefile)
 @progress push 5%
Parsing headers for Climb3Editor
  Running UnrealHeaderTool "A:\Developer\Climb3\Climb3.uproject" "A:\Developer\Climb3\Intermediate\Build\Win64\Climb3Editor\Development\Climb3Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for Climb3Editor in 8.2671405 seconds
 @progress pop
Performing 9 actions (4 in parallel)
[2/9] Resource ModuleVersionResource.rc.inl
[3/9] Resource PCLaunch.rc
SharedPCH.Engine.cpp
Climb3GameMode.cpp
Climb3.cpp
Climb3Character.cpp
Climb3.generated.cpp
[8/9] Link UE4Editor-Climb3.dll
[9/9] Link UE4Editor-Climb3.lib
LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'
   Creating library A:\Developer\Climb3\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Climb3.lib and object A:\Developer\Climb3\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Climb3.exp
ERROR: UBT ERROR: Failed to produce item: A:\Developer\Climb3\Binaries\Win64\UE4Editor-Climb3.dll
Total build time: 24.67 seconds (Local executor: 0.00 seconds)


Tried building in VS 2017 with the “Development Editor” configuration, but I get the following message:

I select yes but unfortunately this is followed by the following error message:

And then the build process stops…

I also tried the “DebugGame Editor” configuration, this doesn’t go nearly as far in the build process, but does throw the following error message in the output console:


1>------ Build started: Project: Climb3, Configuration: DebugGame_Editor x64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props(31,3): warning MSB4011: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Makefile.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.cpp.props (31,3)". This is most likely a build authoring error. This subsequent import will be ignored. [A:\Developer\Climb3\Intermediate\ProjectFiles\Climb3.vcxproj]
1>Performing full C++ include scan (hot reloading a new target)
1>Creating makefile for hot reloading Climb3Editor (no existing makefile)
1>Compiling game modules for hot reload
1>Parsing headers for Climb3Editor
1>  Running UnrealHeaderTool "A:\Developer\Climb3\Climb3.uproject" "A:\Developer\Climb3\Intermediate\Build\Win64\Climb3Editor\DebugGame\Climb3Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
1>Reflection code generated for Climb3Editor in 3.1167294 seconds
1>Performing 8 actions (4 in parallel)
1>[2/8] Resource PCLaunch.rc
1>SharedPCH.Engine.NonOptimized.cpp
1>Climb3.cpp
1>Climb3GameMode.cpp
1>Climb3.generated.cpp
1>Climb3Character.cpp
1>[7/8] Link UE4Editor-Climb3-5559-Win64-DebugGame.dll
1>[8/8] Link UE4Editor-Climb3-5559-Win64-DebugGame.lib
1>LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'
1>   Creating library A:\Developer\Climb3\Intermediate\Build\Win64\UE4Editor\DebugGame\UE4Editor-Climb3-5559-Win64-DebugGame.lib and object A:\Developer\Climb3\Intermediate\Build\Win64\UE4Editor\DebugGame\UE4Editor-Climb3-5559-Win64-DebugGame.exp
1>ERROR : UBT error : Failed to produce item: A:\Developer\Climb3\Binaries\Win64\UE4Editor-Climb3-5559-Win64-DebugGame.dll
1>Total build time: 29.91 seconds (Local executor: 0.00 seconds)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.16\Engine\Build\BatchFiles\Build.bat" Climb3Editor Win64 DebugGame "A:\Developer\Climb3\Climb3.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "Climb3.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


It looks like the “ws2_32.lib” file is the missing culprit in all cases, how do I create/restore/link to this file?

im having the same issue

I’ve been struggling with the exact same issue for the past couple of days. Fresh install of both UE4 and VS 2017.

I am having exactly the same bug problem. I go to create a new Basic C++ project in 4.16 and starts compiling part way then gives up and gives my the below error message. UE4 C++ project creation wizard is totally broke. UE4 BP Creation wizard appear to work just as they should.

ERROR MESSAGE SAYS:

You’re probably missing some VS components. Open the installer again and make sure these are enabled:

  • Desktop development with .NET
  • Desktop development with C++
  • Game development with C++

The windows 8.1 sdk also needs to be enabled under individual components.

Oddly enough, what finally fixed the problem for me was going to the VS 2017 installer and checking “Unreal Engine installer” from the list to include it. I had originally excluded this option because I manually downloaded UE4 and assumed I didn’t need it.


This is the correct answer. After following your instruction C++ projects for UE4 4.16 loaded up perfectly and double clicking C++ classes in UE4 caused VS2017 to load the code just as it should.

However oddly enough I had previously had literally everything VS had to offer installed, for no good reasons, and did not work. I Uninstalled all that unnecessary stuff and reinstalled with only the needed stuff, and it worked.

**ok, never mind, it works one time perfectly then it comes back again. Still no solid solution for this bug. Perhaps Epic should release a hot patch for this?

I don’t get it… I tried what was listed above and everything is enabled “Unreal Engine installer” it installed unity on my machine for some reason

Running C:/Program Files/Epic Games/UE_4.16/Engine/Binaries/DotNET/UnrealBuildTool.exe RollingRocks Development Win64 -project=“C:/Users/Bee/Documents/Unreal Projects/RollingRocks/RollingRocks.uproject” -editorrecompile -progress -NoHotReloadFromIDE
Performing full C++ include scan (building a new target)
Creating makefile for RollingRocks (no existing makefile)
C:\Program Files\Epic Games\UE_4.16\Engine\Plugins\Marketplace\ImageResizUEr\Source\ImageResizUEr\ImageResizUEr.Build.cs: warning: Module constructors should take a ReadOnlyTargetRules argument (rather than a TargetInfo argument) and pass it to the base class constructor from 4.15 onwards. Please update the method signature. @progress push 5%
Parsing headers for RollingRocksEditor
Running UnrealHeaderTool “C:\Users\Bee\Documents\Unreal Projects\RollingRocks\RollingRocks.uproject” “C:\Users\Bee\Documents\Unreal Projects\RollingRocks\Intermediate\Build\Win64\RollingRocksEditor\Development\RollingRocksEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
Reflection code generated for RollingRocksEditor in 12.3831765 seconds @progress pop
Performing 9 actions (4 in parallel)
[3/9] Resource PCLaunch.rc
[2/9] Resource ModuleVersionResource.rc.inl
SharedPCH.Engine.cpp
RollingRocksGameMode.cpp
RollingRocks.generated.cpp
RollingRocksBall.cpp
RollingRocks.cpp
[8/9] Link UE4Editor-RollingRocks.dll
[9/9] Link UE4Editor-RollingRocks.lib
LINK : fatal error LNK1181: cannot open input file ‘ws2_32.lib’
Creating library C:\Users\Bee\Documents\Unreal Projects\RollingRocks\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RollingRocks.lib and object C:\Users\Bee\Documents\Unreal Projects\RollingRocks\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RollingRocks.exp
ERROR: UBT ERROR: Failed to produce item: C:\Users\Bee\Documents\Unreal Projects\RollingRocks\Binaries\Win64\UE4Editor-RollingRocks.dll
Total build time: 163.49 seconds (Local executor: 0.00 seconds)

I had the same issue as everyone. This solves the issue and it works every time I generate new C++ project and class.
Thank you

I’ve done everything but am still getting 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.20/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Win64 -Project=“C:/Users/game/Documents/Unreal Projects/learning/firstBasicCode/firstBasicCode.uproject” -TargetType=Editor -Progress -NoHotReloadFromIDE
Performing full C++ include scan (building a new target)
Creating makefile for firstBasicCodeEditor (no existing makefile)
Using Visual Studio 2017 14.16.27023 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023) and Windows 10.0.17763.0 SDK (C:\Program Files (x86)\Windows Kits\10).
@progress push 5%
Parsing headers for firstBasicCodeEditor
Running UnrealHeaderTool “C:\Users\game\Documents\Unreal Projects\learning\firstBasicCode\firstBasicCode.uproject” “C:\Users\game\Documents\Unreal Projects\learning\firstBasicCode\Intermediate\Build\Win64\firstBasicCodeEditor\Development\firstBasicCodeEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
Reflection code generated for firstBasicCodeEditor in 13.5799416 seconds
@progress pop
Building 8 actions with 4 processes…
@progress ‘Compiling C++ source code…’ 0%
@progress ‘Compiling C++ source code…’ 12%
[1/8] PCLaunch.rc
@progress ‘Compiling C++ source code…’ 25%
[2/8] SharedPCH.Engine.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\INCLUDE\sal.h: warning C4821: Unable to determine Unicode encoding type, please save the file with signature (BOM)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\INCLUDE
ew: error C4821: Unable to determine Unicode encoding type, please save the file with signature (BOM)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\INCLUDE\vcruntime.h: error C4821: Unable to determine Unicode encoding type, please save the file with signature (BOM)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(136): error C2144: syntax error: ‘int’ should be preceded by ‘;’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(136): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(283): error C2065: ‘In_opt_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(283): error C2062: type ‘const wchar_t’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(519): error C2059: syntax error: ‘constant’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(519): error C2144: syntax error: ‘int’ should be preceded by ‘;’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(519): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(519): error C4183: ‘Field_range’: missing return type; assumed to be a member function returning ‘int’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(19): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(19): error C2146: syntax error: missing ‘;’ before identifier ‘_CRT_BEGIN_C_HEADER’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(22): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(22): error C2062: type ‘int’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(23): error C2065: ‘Out’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(23): error C2062: type ‘int’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(28): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(28): error C2062: type ‘unsigned long’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(29): error C2065: ‘Out’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h(29): error C2062: type ‘unsigned long’ unexpected
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\INCLUDE\vcruntime_string.h: error C4821: Unable to determine Unicode encoding type, please save the file with signature (BOM)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(33): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(33): error C2086: ‘int _CRT_END_C_HEADER’: redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(2010): note: see declaration of ‘_CRT_END_C_HEADER’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(33): error C2146: syntax error: missing ‘;’ before identifier ‘_CRT_BEGIN_C_HEADER’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(41): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(41): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(64): error C7525: inline variables require at least ‘/std:c++17’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(64): error C2146: syntax error: missing ‘;’ before identifier ‘memmove_s’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(65): error C2065: ‘_DestinationSize’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(65): error C2065: ‘_SourceSize’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(65): error C3861: ‘Out_writes_bytes_to_opt’: identifier not found
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(65): error C2062: type ‘void’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(70): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h(70): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(83): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(83): error C2086: ‘int _CRT_END_C_HEADER’: redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(2010): note: see declaration of ‘_CRT_END_C_HEADER’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(83): error C2146: syntax error: missing ‘;’ before identifier ‘_CRT_BEGIN_C_HEADER’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(86): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(86): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(95): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(95): error C2146: syntax error: missing ‘;’ before identifier ‘Ret_notnull
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(96): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h(96): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(25): error C2086: ‘int _CRT_END_C_HEADER’: redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(2010): note: see declaration of ‘_CRT_END_C_HEADER’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(25): error C2146: syntax error: missing ‘;’ before identifier ‘_CRT_BEGIN_C_HEADER’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(37): error C2988: unrecognizable template declaration/definition
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(37): error C2059: syntax error: ‘return’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(37): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(37): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(41): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(41): error C2062: type ‘const wchar_t’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(44): error C2144: syntax error: ‘wint_t’ should be preceded by ‘;’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(45): error C2144: syntax error: ‘wint_t’ should be preceded by ‘;’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(46): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(46): error C2062: type ‘wchar_t’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(47): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(47): error C2146: syntax error: missing ‘)’ before identifier ‘wint_t’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(49): error C2144: syntax error: ‘wint_t’ should be preceded by ‘;’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(50): error C2144: syntax error: ‘wint_t’ should be preceded by ‘;’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(51): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(51): error C2062: type ‘wchar_t’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(52): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(52): error C2146: syntax error: missing ‘)’ before identifier ‘wint_t’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(63): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(63): error C2062: type ‘unsigned __int64’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(71): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(71): error C2062: type ‘unsigned __int64’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(79): error C2065: ‘In’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(79): error C2062: type ‘unsigned __int64’ unexpected
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(86): error C2146: syntax error: missing ‘;’ before identifier ‘_vcwprintf_l’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(87): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(87): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string_params
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(94): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(94): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(100): error C2146: syntax error: missing ‘;’ before identifier ‘_vcwprintf’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(101): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(101): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(107): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(107): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(113): error C2146: syntax error: missing ‘;’ before identifier ‘_vcwprintf_s_l’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(114): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(114): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string_params
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(121): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(121): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(127): error C2146: syntax error: missing ‘;’ before identifier ‘_vcwprintf_s’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(128): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(128): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(134): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(134): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(140): error C2146: syntax error: missing ‘;’ before identifier ‘_vcwprintf_p_l’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(141): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(141): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string_params
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(148): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(148): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(154): error C2146: syntax error: missing ‘;’ before identifier ‘_vcwprintf_p’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(155): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(155): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(161): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(161): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(167): error C2146: syntax error: missing ‘;’ before identifier ‘_cwprintf_l’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(168): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(168): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string_params
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(174): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(174): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(185): error C2146: syntax error: missing ‘;’ before identifier ‘_cwprintf’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(186): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(186): error C2146: syntax error: missing ‘)’ before identifier ‘Printf_format_string
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(191): error C2143: syntax error: missing ‘;’ before ‘{’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(191): error C2447: ‘{’: missing function header (old-style formal list?)
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(202): error C2146: syntax error: missing ‘;’ before identifier ‘_cwprintf_s_l’
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(203): error C2065: ‘In_z’: undeclared identifier
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h(203): fatal error C1003: error count exceeds 100; stopping compilation
ERROR: UBT ERROR: Failed to produce item: C:\Users\game\Documents\Unreal Projects\learning\firstBasicCode\Binaries\Win64\UE4Editor-firstBasicCode.dll
(see …/Programs/UnrealBuildTool/Log.txt for full exception trace)
Total build time: 24.52 seconds (Parallel executor: 0.00 seconds)

Please am new to Unreal Game development.

\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_wconio.h
\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h
\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_memcpy_s.h
\Windows Kits\10\include\10.0.17763.0\ucrt\errno.h
\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h

See: visual studio 2015 - Cannot find corecrt.h: $(UniversalCRT_IncludePath) is wrong - Stack Overflow

You need to install the VC++ 2017 VXX toolset using the visual studio community installer.

Yes! It helps!
And my mistake was to use VS 2019 instead 2017.

My way was that (semi-clean installation):

  1. Clean system from all VS VC++ installations (like redistribuatable installations with STEAM games. Games was deleted before, but trash was remain.).
  2. Uninstall UE4 and all components.
  3. Install UE4 and all VS components from quoted message above.
  4. Reboot.

After that I have working project with no exceptions on code generation step.

P.S.: Also I made “zone of no attention” for my antivirus software in UE4 project folder.

OMG lads, you both saved my life, bless your souls <3

Still, there are lots of false positives in visual studio, which is quite annoying. I hope there will be a fix in a near future for that.

Hi I have been struggling with opening a new UE4 blank C ++ project. The message I get is:

The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/UE_4.25/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Win64 -Project=“C:/Users/user/Documents/Unreal Projects/MyProject/MyProject.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Creating makefile for MyProjectEditor (no existing makefile)
@progress push 5%
Parsing headers for MyProjectEditor
Running UnrealHeaderTool “C:\Users\user\Documents\Unreal Projects\MyProject\MyProject.uproject” “C:\Users\user\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\user\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed
Reflection code generated for MyProjectEditor in 4,6672079 seconds
@progress pop
Building MyProjectEditor…
Using Visual Studio 2019 14.26.28806 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Building 9 actions with 8 processes…
@progress ‘Compiling C++ source code…’ 0%
@progress ‘Compiling C++ source code…’ 11%
[1/9] Default.rc2
@progress ‘Compiling C++ source code…’ 22%
[2/9] ERROR: Unable to open C:\Users\user\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\Engine\SharedPCH.Engine.ShadowErrors.h.txt.tmp for output

I am not sure what is the problem.

Please assist!