【问题标题】:Unreal Engine 4.10.1 can't compile Visual Studio 2015 projectUnreal Engine 4.10.1 无法编译 Visual Studio 2015 项目
【发布时间】:2016-04-05 18:09:51
【问题描述】:

我最近在我的 Windows 7 上安装了最新版本的 UE,并创建了一个新的空 C++ 项目。创建项目后,它给了我一个错误,说它无法编译。我在 VS 中打开项目以手动编译它,这是我得到的输出。 我在网上查了一下,但没有得到任何答案。

编辑:我在编译非 UE 项目时使用这些标头没有问题。

1>------ Build started: Project: RPG, Configuration: Development_Editor x64    ------
1>  Performing 7 actions (2 in parallel)
1>  [2/7] Resource PCLaunch.rc
1>C:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Launch\Resources\Windows\PCLaunch.rc(10): fatal error RC1015: cannot open include file 'windows.h'.
1>
1>  PCH.RPG.h.cpp
1>C:\Program Files\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
1>  [3/7] Resource ModuleVersionResource.rc.inl
1>C:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3): fatal error RC1015: cannot open include file 'windows.h'.
1>
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\Users\Jack\Documents\Unreal Projects\RPG\Binaries\Win64\UE4Editor-RPG.dll
1>  Total build time: 3.64 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.10\Engine\Build\BatchFiles\Build.bat" RPGEditor Win64 Development "C:\Users\Jack\Documents\Unreal Projects\RPG\RPG.uproject" -rocket -waitmutex -2015" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

真正让我困惑的部分是它显然无法打开 new.h 和 windows.h,尽管当我检查它们的包含位置时,Visual Studio 打开文件没有问题。

【问题讨论】:

标签: c++ compilation visual-studio-2015 project unreal-engine4


【解决方案1】:

创建虚幻引擎项目后,您可能会遇到如下错误:

  • “致命错误RC1015:无法打开包含文件'windows.h'”
  • “致命错误 C1083:无法打开包含文件:‘新’:没有这样的文件或目录”。

要修复它,请打开您的项目(不是 EU4 项目)属性/VC++ 目录。

如果您看到“包含目录”、“库目录”等空文件,请单击右侧的组合框并选择“从父​​级或项目默认值继承”。 然后再次编译项目。

以下图片:

Default project template

Build errors

choose inherit from parent or project defaults

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-11
    • 1970-01-01
    • 1970-01-01
    • 2016-03-29
    • 1970-01-01
    相关资源
    最近更新 更多