Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UE] Bug: 在PublicIncludePaths中引入Programs/UnrealHeaderTool/Public,编译时会产生大量警告 #1721

Closed
3 tasks done
watsonsong opened this issue May 15, 2024 · 4 comments
Assignees
Labels
bug Something isn't working Unreal

Comments

@watsonsong
Copy link
Contributor

前置阅读 | Pre-reading

Puer的版本 | Puer Version

1.0.5

UE的版本 | UE Version

5.4.1

发生在哪个平台 | Platform

Editor(win)

错误信息 | Error Message

18:09:31 /data00/unreal-engine/Engine/Source/Developer/CrashDebugHelper/CrashDebugHelper.Build.cs: warning: Referenced directory '/data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/CSharpParamDefaultValueMetas/Developer/CrashDebugHelper/Private' does not exist.
18:09:31 /data00/unreal-engine/Engine/Source/Developer/CrashDebugHelper/CrashDebugHelper.Build.cs: warning: Referenced directory '/data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/CSharpParamDefaultValueMetas/Developer/CrashDebugHelper/Private/Linux' does not exist.
18:09:31 /data00/unreal-engine/Engine/Source/Developer/CrashDebugHelper/CrashDebugHelper.Build.cs: warning: Referenced directory '/data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/CSharpParamDefaultValueMetas/Developer/CrashDebugHelper/Private/Mac' does not exist.
18:09:31 /data00/unreal-engine/Engine/Source/Developer/CrashDebugHelper/CrashDebugHelper.Build.cs: warning: Referenced directory '/data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/CSharpParamDefaultValueMetas/Developer/CrashDebugHelper/Private/Windows' does not exist.
18:09:31 /data00/unreal-engine/Engine/Source/Developer/CrashDebugHelper/CrashDebugHelper.Build.cs: warning: Referenced directory '/data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/CSharpParamDefaultValueMetas/Developer/CrashDebugHelper/Private/IOS' does not exist.
18:09:31 /data00/unreal-engine/Engine/Plugins/AI/HTNPlanner/Source/HTNPlanner/HTNPlanner.Build.cs: warning: Referenced directory '/data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/Plugins/AI/HTNPlanner/Source' does not exist.
18:09:31 /data00/unreal-engine/Engine/Plugins/AI/HTNPlanner/Source/HTNTestSuite/HTNTestSuite.Build.cs: warning: Referenced directory

18:09:33 /data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/ParamDefaultValueMetas/ParamDefaultValueMetas.Build.cs: warning: Referenced directory '/data00/unreal-engine/Engine/Source/Programs/UnrealHeaderTool/Public' does not exist.
18:09:34 /data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/DeclarationGenerator/DeclarationGenerator.Build.cs: warning: Referenced directory '/data00/unreal-engine/Engine/Source/Programs/UnrealHeaderTool/Public' does not exist.
18:09:34 /data00/jenkins/workspace/MyProj/linux_ds/Plugins/Puerts/Source/ParamDefaultValueMetas/ParamDefaultValueMetas.Build.cs: warning: Referenced directory '/data00/unreal-engine/Engine/Source/Programs/UnrealHeaderTool/Public' does not exist.

问题重现 | Bug reproduce

例如在构建Server版本的时候,会出现大量报错。
似乎Programs/UnrealHeaderTool/Public不应该加入到PublicIncludePaths中,将Programs/UnrealHeaderTool/Public公开到外部模模块。

@watsonsong watsonsong added bug Something isn't working Unreal labels May 15, 2024
@chexiongsheng
Copy link
Collaborator

你说的这里? https://github.com/Tencent/puerts/blob/master/unreal/Puerts/Source/ParamDefaultValueMetas/ParamDefaultValueMetas.Build.cs#L23

写在这里,应该就是Public,这是让JsEnv能include到生成的头文件。

看你的报错找不到文件,我感觉和这里没关,添加多一个头文件搜索路径可能会导致找错文件而不是找不到文件。
其次新版本UE也不会用这个模块,如果确实怀疑这里,你在UE5.3+可以把这些干掉。

@watsonsong
Copy link
Contributor Author

应该是从UE5.3开始,已经没有Programs/UnrealHeaderTool/Public这个目录存在了。

是否从5.3开始,ParamDefaultValueMetas可以去掉。但是DeclarationGenerator应该不能去掉把,它的PublicIncludePaths也加入了Programs/UnrealHeaderTool/Public这个路径。

@chexiongsheng
Copy link
Collaborator

DeclarationGenerator应该各版本都可以去掉Programs/UnrealHeaderTool/Public。
但这应该不是导致你问题的原因。这只是添加头文件搜索路径,多加一个不存在的路径没什么问题。5.3、5.4项目都有用puerts,别人能编译通过。

@chexiongsheng
Copy link
Collaborator

c++编译错误应该首先看第一个,从头开始解决,后续错误可能只是前面的错误导致的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Unreal
Projects
None yet
Development

No branches or pull requests

2 participants