gpt4 book ai didi

c++ - 虚幻引擎 4.10.1 无法编译 Visual Studio 2015 项目

转载 作者:太空狗 更新时间:2023-10-29 23:14:15 27 4
gpt4 key购买 nike

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

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

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 打开文件没有问题。

最佳答案

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

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

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

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

下图:

Default project template

Build errors

choose inherit from parent or project defaults

After project fix

关于c++ - 虚幻引擎 4.10.1 无法编译 Visual Studio 2015 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34552036/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com