unreal-clangd icon indicating copy to clipboard operation
unreal-clangd copied to clipboard

5.5 issues with includes: 'sal.h' file not foundclang(pp_file_not_found)

Open romantimm opened this issue 5 months ago • 27 comments

First of all this is an awesome project, a total game chnager for me!

After installing all the needed items for 5.5, waiting for indexing to finish, I have a lot of errors in the entire project, although it compiles fine and project is running.

All of the project files have the same basic error: In included file: 'sal.h' file not found

Which exists in the file Engine\Source\Runtime\Core\Public\Windows\WindowsPlatform.h, specifically this line: #include <sal.h> with error

[{ "resource": "/D:/Repos/UnrealEngine/Engine/Source/Runtime/Core/Public/Windows/WindowsPlatform.h", "owner": "generated_diagnostic_collection_name#0", "code": "pp_file_not_found", "severity": 8, "message": "'sal.h' file not found", "source": "clang", "startLineNumber": 7, "startColumn": 10, "endLineNumber": 7, "endColumn": 17 }]

Also, the file .vscode\unreal-clangd\completionHelper.cpp also has errors with the #include "Engine.h" with same error:

[{ "resource": "/e:/UnrealProjects/SimpleProjects/MyProject/.vscode/unreal-clangd/completionHelper.cpp", "owner": "generated_diagnostic_collection_name#0", "code": "pp_file_not_found", "severity": 8, "message": "In included file: 'sal.h' file not found", "source": "clang", "startLineNumber": 11, "startColumn": 10, "endLineNumber": 11, "endColumn": 20, "relatedInformation": [ { "startLineNumber": 7, "startColumn": 10, "endLineNumber": 7, "endColumn": 17, "message": "Error occurred here", "resource": "/D:/Repos/UnrealEngine/Engine/Source/Runtime/Core/Public/Windows/WindowsPlatform.h" } ] }]

I suspect this is the major one but later in my source files there are many other errors coming from clangd like: In implicit move constructor for 'UMyBlueprintLibrary' first required here

What could be the cause of this?

Thanks!

romantimm avatar Jun 22 '25 07:06 romantimm