虚幻引擎4.10.1无法编译Visual Studio 2015项目 [英] Unreal Engine 4.10.1 can't compile Visual Studio 2015 project

查看:4214
本文介绍了虚幻引擎4.10.1无法编译Visual Studio 2015项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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


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

  1>  - 开始构建:项目:RPG,配置:Development_Editor x64 ------ 
1>执行7个动作(并行2个)
1> [2/7]资源PCLaunch.rc
1> C:\Program Files \Epic Games \4.10\Engine\Source\Runtime\Launch\Resources\Windows \PCLaunch。 rc(10):致命错误RC1015:无法打开包含文件'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):致命错误C1083:无法打开包含文件:'new':没有这样的文件或目录
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):致命错误RC1015:无法打开包含文件'windows.h'。
1>
1> --------结束详细动作统计资料-------------------------------------- ---------------------
1>错误:UBT错误:无法生成项目:C:\Users\Jack\Documents\ Unreal Projects \RPG\Binaries\Win64\UE4Editor-RPG.dll
1>总构建时间:3.64秒
1> C:\Program文件(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\ Microsoft.MakeFile.Targets(37,5):错误MSB3073:命令C:\Program Files \Epic Games \4.10\Engine\Build\BatchFiles\Build.batRPGEditor Win64 DevelopmentC:\Users\Jack\Documents \Unreal Projects \RPG\RPG.uproject-rocket -waitmutex -2015退出,代码为-1。
========== Build:0成功,1失败,0最新,0跳过==========

真的让我困惑的部分是,它显然不能打开new.h和windows.h虽然Visual Studio没有问题打开文件

解决方案

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




  • 致命错误RC1015:无法打开包含文件'windows.h'

  • 致命错误C1083:



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



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



图片如下:




I recently installed the most recent version of UE on my Windows 7 and made a new empty C++ project. After creating the project it gave me an error saying it failed to compile. I opened the project in VS to manually compile it and this is the output I got. I looked online but got no answers.

EDIT: I use these headers with no issues when compiling non-UE projects.

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 ==========

The part that really confuses me is that it apparently can't open new.h and windows.h though Visual Studio has no problem opening the file when I check where they were included.

解决方案

After creating an Unreal Engine project you may face errors like:

  • "fatal error RC1015: cannot open include file 'windows.h' "
  • "fatal error C1083: Cannot open include file: 'new': No such file or directory".

To fix it open your project (not EU4 project) properties/VC++ Directories.

If you see empty fileds like "Include Directories", "Library Directories" then click on the combo box on the right side and choose "inherit from parent or project defaults". Then compile the project again.

Images below:

Default project template

Build errors

choose inherit from parent or project defaults

这篇关于虚幻引擎4.10.1无法编译Visual Studio 2015项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆