【问题标题】:[UE4 error]The project could not be compiled. Would you like to open it in Visual Studio?[UE4错误]项目无法编译。你想在 Visual Studio 中打开它吗?
【发布时间】:2018-11-15 10:26:30
【问题描述】:

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

当我卸载我的 Visual Studio 2015 时发生这种情况,无论我使用 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,它可能会得到修复,但它没有。

它看到 ue4 为 VS 2015 生成 C++ 文件。 enter image description here

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

【问题讨论】:

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


    【解决方案1】:

    我通过从这个链接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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多