当前位置:网站首页>Ue4/5 cannot open the file "xxx.generated.h" (cannot open file xxx.generated.h) solution summary
Ue4/5 cannot open the file "xxx.generated.h" (cannot open file xxx.generated.h) solution summary
2022-07-24 06:59:00 【Zero one_】
Unable to open xxx.generated.h yes UE One of the common problems in development , Sometimes people scratch their heads . This paper will summarize the author's various methods to solve this kind of problem in actual development , New methods will be added here in the future .
Method 1 , Delete Intermediate Folder , And regenerate
The first solution is to delete Intermediate Folder , Reuse uproject File generation VS Engineering documents (Generate Visual Studio project files). It should be noted that ,Intermediate The folder is not only in the main project directory , There are also in the directories of various plug-ins .xxx.h Which directory does the file belong to , We will delete the directory Intermediate Folder .


We know , Various xxx.generated.h By UHT(Unreal Header Tool) Generated , And keep it in Intermediate Folder . Delete Intermediate Folder ,UHT Will regenerate generated.h file . So this method is effective .
Method 2 , Delete all generated files , Regenerate
UE In the engineering catalogue , Some files and folders are automatically generated by the system . In the following two figures , We highlighted these files , Also, don't forget that there are these files in the plug-in .


Delete .vs Folder 、Binaries Folder 、Intermediate Folder 、Saved Folder 、sln file , Not only can it solve xxx.generated.h The file cannot be opened , It can also solve other difficult and miscellaneous diseases . But here's the thing , In the delete Binaries Folder time , Be sure not to use it dll When the third-party library is deleted , Otherwise, the following problems will occur .

Method 3 : Adjust module dependencies
If there are multiple modules in the plug-in , If the dependencies of these modules are not set correctly , It can also lead to xxx.generated.h Problems that cannot be opened . As shown in the figure below , Suppose the same plug-in , There are two modules AA and BB, And the module AA rely on BB. If in the module AA Of Build.cs There is no setting for BB Dependence ( As shown on the left in the figure below ), Or put it right BB The dependence of is written in PrivateDependencyModuleNames in ( As shown in the right figure in the following figure ), It will also lead to such problems .


Use the two settings above , Will lead to the following “ Can't open file ‘xxx.generated.h’” The problem of , The solution is in PublicDependencyModuleNames To the module BB Dependence . Here's an explanation PublicDependencyModuleNames and PrivateDependencyModuleNames The difference between : Dependent on modules AA Other modules of , Such as the main file directory , Only its PublicDependencyModuleNames Modules exposed in , Cannot access PrivateDependencyModuleNames Modules declared in .

边栏推荐
- chm文件打开时提示乱码
- [jquery custom plug-in] 1 custom cache plug-in -jquerycache
- OWASP TOP10 penetration test
- 【微信小程序】一文搞懂条件渲染、列表渲染以及wxss模板样式
- js和ts学习总结
- 记录PHPSerializer工具类反序列化遇到的坑
- Special effects - starry cosmic background effects
- XXL execute node error log swiping
- STM32 ADC based on Hal library uses DMA multi-channel sampling and solves the problems encountered
- postgresql 日期处理函数用法
猜你喜欢

Machine learning case: smoking in pregnant women and fetal health

Kubernetes rapid installation

STM32外部中断(寄存器版本)
![[lvgl (6)] display Chinese settings and make Chinese font](/img/a4/1b0d0b7a5789ecc8f9a2a8cd93d92e.png)
[lvgl (6)] display Chinese settings and make Chinese font

(笔记整理未完成)【图论:求单源最短路径】

UE4/5 无法打开文件“xxx.generated.h”(Cannot open file xxx.generated.h)的解决方法总结

xxl执行节点错误日志刷屏

反射

MapReduce (I)

sojson jsjiami.com. V6 crawler JS reverse
随机推荐
Special effects - when the mouse moves, there will be a custom expression trail
Camera Hal OEM模块 ---- cmr_grab.c
Redis数据类型-列表List
[lvgl layout] grid layout
[lvgl (1)] a brief introduction to lvgl
[learning notes] what happens when the URL is input into the page presentation?
(static, dynamic, file) three versions of address book
Breadth first search (template use)
安装snownlp包过程出现Requirement already satisfied:及Read timed out.问题解决方法
反射
Jsonobject is sorted in A-Z order of key
tensorflow scatter_nd函数
kubernetes 的Deployment(部署),Service概念,动态扩缩容
先爱自己,再爱别人。
Redis.conf详解
Never lose yourself!
[learning notes] possible reasons and optimization methods for white screen on Web pages
Depth first search (template use)
Nodejs enables multi process and inter process communication
Accumulation of project problems