Header File not found! Strange Visual Studio Compiler error

Hi,

I am integrating Lyra UI Source Code in my game project and I have some strange errors where compiler tells that he cannot find C++ header file but it is existing in source code.

Screenshot 2026-10-15 174958

Can you please help me to resolve this issue? I do not understand what causing this error and why compiler not see header file im source.

Please help!

Ruslan

The error in your screenshot is C1083 on "Settings/LyraSettingsLocal.h". Solution Explorer listing that file does not put it on the compiler’s include path.

Unreal resolves a quoted include like that only from the include paths of the module that is currently compiling (the module root, plus Public/ and Private/). UBT writes those paths into the vcxproj. The VS filter tree is just a view, and it is often stale after you copy files around. A file can show up in the tree and still not be visible to the cpp that actually failed.

In Lyra that header lives in the LyraGame module, at Source/LyraGame/Settings/LyraSettingsLocal.h, not under Public/. Headers outside Public/ are private to that module. Adding "LyraGame" to another module’s Build.cs does not make them includable. So if the cpp that threw C1083 is in your game module (or a UI module you copied) and the header is still inside LyraGame, this is the error you should expect.

Two ways out:

  1. Keep the include in the same module. Move LyraSettingsLocal.h and LyraSettingsLocal.cpp into the module that includes them, at Source/<ThatModule>/Settings/LyraSettingsLocal.h, so the quoted path matches. Then right-click the .uproject and Generate Visual Studio project files. If the file shows as missing/red in the tree, the filter is still pointing at the old location.

  2. Share it across modules. Move only the header to Source/LyraGame/Public/Settings/LyraSettingsLocal.h and add "LyraGame" to PublicDependencyModuleNames of the module that includes it. Private headers stay invisible no matter what Build.cs says.

ULyraSettingsLocal is not a leaf. It pulls in the Lyra local player, the GameSettings UGameUserSettings subclass, and the settings registry. The next missing includes (LyraLocalPlayer.h, LyraSettingsShared.h, and so on) will be the same kind of path problem. Copy the whole Settings folder into one module instead of fixing them one include at a time.

After the move: close the editor and VS, delete that module’s Intermediate and Binaries, regenerate project files, and rebuild. A PCH rebuild alone will not clear C1083.

Hi ChenDong!

Thanks a lot for explanation! I have tried it but still problems with header files.

Can you please look it my small test project and try to compile it and tell me what I should do to really fix this issues?

Project files:

Please help me!

I cannot do further development…

Ruslan

Hi ChenDong,

I will try your second method of fixing problem, and tell you results!

Hi ChenDong,

I have tried second method and it works but i still have some problems with compiling.

First AudioModulation header files cannot be found, but plugin included.

And second it cannot find one header from plugins from Lyra.

Here are project files which cannot be compiled because of headers:

Please help me to resolve these issues, very difficult issues.

Ruslan

Hello! I looked into the files you posted, and I believe your build.cs file is still missing the modules.
In Source/OutpostSniperRebels/OutpostSniperRebels.Build.cs you probably need to include the new modules in the PublicDependencyModuleNames list (or possibly the PrivateDependencyModuleNames, depending on where you’re calling the module, but try public first)

Thanks a lot, it helped!

Hi ChenDong!

Thanks a lot, i was able to compile Lyra UI module in test project! And it works but only if I use LYRAGAME_API in source code, otherwise it does not see classes and cannot inherit from base classes in Unreal Editor UI blueprints.

Ruslan