簡體   English   中英

虛幻引擎4.10.1無法編譯Visual Studio 2015項目

[英]Unreal Engine 4.10.1 can't compile Visual Studio 2015 project

我最近在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在檢查文件的位置時打開文件沒有問題。

創建虛幻引擎項目后,您可能會遇到以下錯誤:

  • “致命錯誤RC1015:無法打開包含文件'windows.h'”
  • “致命錯誤C1083:無法打開包含文件:'new':沒有這樣的文件或目錄”。

要修復它,請打開您的項目(而不是EU4項目)屬性/ VC ++目錄。

如果您看到“Include Directories”,“Library Directories”等空文件,請單擊右側的組合框,然后選擇“從父​​項目或項目默認值繼承”。 然后再次編譯項目。

下圖:

默認項目模板

構建錯誤

從父項目或項目默認值中選擇繼承

項目修復后

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM