[UE4错误]项目无法编译。你想在Visual Studio中打开它吗?

时间:2018-06-05 20:29:40

标签: c++ visual-studio unreal-engine4

我看到很多人问这个问题,显然这个问题没有绝对的答案。

当我卸载我的视觉工作室2015导致虚幻4.18无论我使用VS 2015并且我想使用2017而且我看到有些人通过卸载VS 2015来解决这个问题时,这发生在我身上。

当我卸载VS 2015时,当我想创建一个新的C ++项目时收到此错误:

无法编译项目。你想在Visual Studio中打开它吗?

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

错误图像(我可以看到上面的复制说明):enter image description here

许多人提到它与Windows SDK有关,如果我添加更多信息,请安装Windows SDK。 enter image description here

我想如果我安装了虚幻4.19,它可能会得到修复,但它没有。

它为VS 2015提供了ue4 genrate C ++文件。 enter image description here

我希望有人知道如何解决这个问题并指导我如何。

1 个答案:

答案 0 :(得分:0)

我通过从此链接https://github.com/Microsoft/VisualStudioUninstaller/releases下载此清理程序来解决此问题。 在那个UE4之后,当你想要创建新项目发送消息时,它说你没有让VS2017感到恐慌只是下载安装程序并修改它之后下载大约350毫克,之后,一切都会得到修复。 了解更多信息: https://answers.unrealengine.com/questions/597939/new-c-project-fails-to-compile-using-ue-415-and-vs.html