当前位置:网站首页>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 .

边栏推荐
- Sealos packages and deploys kubesphere container platform
- 基于回归分析的广告投入销售额预测——K邻近,决策树,随机森林,线性回归,岭回归
- PostgreSQL date handler usage
- Camera Hal OEM module ---- CMR_ grab.c
- [lvgl (4)] event and event bubble of the object
- STM32 MP3 music player based on FatFs r0.14b & SD card (also a simple application of FatFs)
- lambda表达式对list对象进行多字段排序
- SparkSQL核心使用,220724,
- HashSet转数组
- Identification of Chinese medicinal materials
猜你喜欢

metaRTC5.0实现君正的纯C的webrtc版IPC

SparkSQL核心使用,220724,
![[audio decoding chip] Application of vs1503 audio decoding chip](/img/ee/0d5f95fba647592cc95f1e9f410bc9.png)
[audio decoding chip] Application of vs1503 audio decoding chip

Prediction of advertising investment and sales based on regression analysis -- K neighborhood, decision tree, random forest, linear regression, ridge regression

GE口:SGMII模式和serdes模式

OSS authorizes a single bucket permission

记录PHPSerializer工具类反序列化遇到的坑
![[lvgl (3)]](/img/d3/1e2bad232f29c6c75ff163a6c0f378.png)
[lvgl (3)]

Thinking of data analysis -- analyzing the retail industry as a whole -- an all-round and multifaceted detailed analysis

kubernetes 的Deployment(部署),Service概念,动态扩缩容
随机推荐
MGR_ mysqlsh_ Keepalive high availability architecture deployment document
MGR_mysqlsh_keepalive高可用架构部署文档
【微信小程序】一文搞懂条件渲染、列表渲染以及wxss模板样式
Special effects - cobweb background effects
Mac can't connect to local MySQL server through socket '/tmp/mysql Sock '(2) problem
Metaltc5.0 realizes webrtc version IPC of Junzheng pure C
js和ts学习总结
[learning notes] Web page rendering process
Redis数据类型-String(字符串类型)
华为专家自述:如何成为优秀的工程师
Special effects - return to the top (kitten effects)
使用root用户为创建新用户并设置密码
lambda表达式对list对象进行多字段排序
[wechat applet] understand conditional rendering, list rendering and wxss template style
【学习笔记】Web页面渲染的流程
Introduction to kubernetes (kubernetes benefits)
Don't compare with anyone, just be yourself
Random forest, lgbm parameter adjustment based on Bayesian Optimization
永远不要迷失自我!
Kubernetes rapid installation