Quick answer: C1083 means the compiler could not find the file named in an #include on any search path Unreal Build Tool gave it. For an engine or plugin header, add the header’s module to PublicDependencyModuleNames or PrivateDependencyModuleNames in your Build.cs. For a .generated.h file, check that the header has a UCLASS, USTRUCT or UENUM, sits inside a module’s source folder and is included under the right name. For your own headers, write the path relative to the module’s Public or Private folder.

The build stops on an #include line and says the file does not exist, often for a file you can see in the Solution Explorer or in the engine source. In an Unreal project the include search paths are not a Visual Studio setting. Unreal Build Tool (UBT) computes them from your module’s Build.cs and folder layout, so the fix is almost never in the IDE. This guide lists the cases, shows how to tell them apart from the file name in the message, and gives the fix for each.

The exact error

D:\Projects\MyGame\Source\MyGame\MyActor.h(7): fatal error C1083: Cannot open include file: 'MyActor.generated.h': No such file or directory
D:\Projects\MyGame\Source\MyGame\HudWidget.h(6): fatal error C1083: Cannot open include file: 'Blueprint/UserWidget.h': No such file or directory

On Mac, Linux, Android and other Clang platforms the same failure reads:

MyActor.h:7:10: fatal error: 'MyActor.generated.h' file not found

Visual Studio’s IntelliSense has its own version, E1696 cannot open source file "MyActor.generated.h", which appears in the Error List before you have built anything. Only codes that start with C come from the compiler. If the build succeeds and only E1696 remains, build once and regenerate project files; nothing is wrong with the code.

Two details of the message matter. It is a fatal error, so the compiler abandons that source file at the first include it cannot open: you see one C1083 per file, and fixing it may reveal the next. And when the text after the code says something other than include file, for example compiler generated file, the problem is the disk, a file lock or a path that is too long, not your includes.

Where the compiler looks

For a quoted include, the compiler first looks in the folder of the file that contains the #include, then in each search path it was given. UBT builds that list for every module:

That is the whole list. Another module’s Private folder is not on it, a module you did not name is not on it, and the project root is not on it. Include paths you add in Visual Studio (Project > Properties, then VC++ Directories) have no effect, because UBT does not read the project file when it compiles.

Include paths are written from the root of the Public or Private folder, with forward slashes. Engine/Source/Runtime/UMG/Public/Blueprint/UserWidget.h is included as "Blueprint/UserWidget.h", and it is found only when UMG is one of your dependencies.

Which case you have

The file name in the message tells you most of it.

File in the messageLikely causeFix
MyActor.generated.h, for a header in your moduleUnreal Header Tool produced nothing for that header, or produced it under another nameMissing .generated.h
Something.generated.h, for a header from another module or pluginThat module is not a dependency, so its generated folder is not searchedAdd the module to Build.cs
An engine or plugin header: Blueprint/UserWidget.h, AIController.h, NiagaraComponent.hThe module that owns the header is not in Build.csAdd the module to Build.cs
One of your own headersWrong relative path, a header in a subfolder, or a file created outside SourceFix the path
A header in another module’s Private folderPrivate headers are not visible to other modulesMove it to Public
Editor.h, UnrealEd.h or another editor header, when packagingAn editor-only module used from game codeGuard it with WITH_EDITOR
Builds on Windows, fails on a Linux build machineThe case of the include does not match the file, or the path uses backslashesMatch case exactly
A header you renamed or deletedAn #include somewhere still uses the old nameSearch the source for the old name
windows.h, stdio.h or another system headerThe Visual Studio installation lacks the C++ toolset or a Windows SDKRun Visual Studio Installer, choose Modify, add the Game development with C++ workload and a Windows SDK

A missing .generated.h

Unreal Header Tool (UHT) runs before the compiler. For every header in a module that contains reflection macros it writes a Name.generated.h into the project’s Intermediate/Build tree, in an Inc/<ModuleName> folder. When the compiler cannot open that file, UHT did not write it. The reasons, most common first:

  1. An earlier error in the same build. Scroll up in the Output window. If UHT reported an error of its own, it stopped before generating anything, and the C1083 lines are fallout. Fix the UHT error first.
  2. The header has nothing to reflect. A plain C++ header with no UCLASS, USTRUCT, UENUM, UINTERFACE or delegate declaration gets no generated file. Remove the include.
  3. The name does not match the file. The generated header is named after the header file, not the class. Enemy.h includes Enemy.generated.h even if the class inside is AEnemyCharacter. After renaming a file, rename the include.
  4. The header is outside the module. UHT only scans a module’s source folder, the one that contains the Build.cs. A header saved next to the .uproject, directly under Source, or in Intermediate/ProjectFiles is invisible to it. The last one is where Visual Studio’s Add > New Item puts files by default.
  5. The header belongs to another module that your module does not depend on. See the next section.
  6. Stale intermediate files after moving headers between folders or modules, switching branches or changing engine version.

For the last case, and whenever the cause is not obvious, do a clean regeneration:

  1. Close the editor and the IDE.
  2. Delete the project’s Intermediate and Binaries folders, and the same two folders inside each plugin under the project’s Plugins folder. Leave Source, Content, Config and Saved alone.
  3. Right-click the .uproject and choose Generate Visual Studio project files.
  4. Build Development Editor from the IDE and read the first error.

Creating classes through Tools > New C++ Class in the editor avoids cases 3 and 4, because the editor writes both files into the module and names the include for you. The other rules for that include line are in #include found after .generated.h file.

An engine or plugin header: add the module to Build.cs

This is the most common form of the error in gameplay code. A new project depends on a handful of modules. Everything else has to be named before its headers can be found:

// Source/MyGame/MyGame.Build.cs
using UnrealBuildTool;

public class MyGame : ModuleRules
{
	public MyGame(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicDependencyModuleNames.AddRange(new string[] {
			"Core", "CoreUObject", "Engine", "InputCore",
			"UMG", "AIModule", "NavigationSystem"          // added
		});

		PrivateDependencyModuleNames.AddRange(new string[] {
			"Slate", "SlateCore"
		});
	}
}

Use PublicDependencyModuleNames when your own public headers include the other module’s headers, and PrivateDependencyModuleNames when only your .cpp files do. Either one puts the headers on the search path.

To find the module for a header, open the class in Epic’s C++ API reference, which lists the module next to the include line, or look at where the header sits in the engine source: the folder that contains its Public or Classes folder is the module, and that folder’s Build.cs carries the exact name. The ones that come up most:

HeaderModulePlugin to enable
Blueprint/UserWidget.h, Components/WidgetComponent.hUMG
Widgets/SCompoundWidget.hSlateCore (most other Widgets/ headers: Slate)
AIController.h, BehaviorTree/BlackboardComponent.h, BehaviorTree/BTTaskNode.hAIModule
GameplayTask.hGameplayTasks
NavigationSystem.hNavigationSystem
GameplayTagContainer.hGameplayTags
PhysicalMaterials/PhysicalMaterial.hPhysicsCore
HttpModule.h, Interfaces/IHttpRequest.hHTTP
Dom/JsonObject.hJson
EnhancedInputComponent.h, InputActionValue.hEnhancedInputEnhanced Input
NiagaraComponent.h, NiagaraFunctionLibrary.hNiagaraNiagara
AbilitySystemComponent.hGameplayAbilitiesGameplay Abilities
Editor.hUnrealEd (editor builds only)

A module that lives in a plugin needs two things: the entry in Build.cs, and the plugin enabled for the project under Edit > Plugins, which writes it into the .uproject:

"Plugins": [
	{
		"Name": "GameplayAbilities",
		"Enabled": true
	}
]

If you misspell a module name, or name a module from a plugin that is not installed, the build stops earlier with a UBT error of this form, before any C++ is compiled:

Could not find definition for module 'GameplayAbilties', (referenced via Target -> MyGame.Build.cs)

After editing Build.cs, build again from the IDE. UBT notices the change by itself. Regenerate project files as well if you want IntelliSense to find the new headers. If the code now compiles and the linker fails, the cause is one step further along the same chain and is covered in the LNK2019 guide.

Your own headers: paths, subfolders and files in the wrong place

With the standard layout, includes are written relative to the Public or Private folder:

Source/MyGame/Public/Weapons/Gun.h
Source/MyGame/Private/Weapons/Gun.cpp
Source/MyGame/Private/Player/Hero.cpp
// Hero.cpp
#include "Gun.h"             // C1083: no search path ends in Weapons
#include "Weapons/Gun.h"     // correct: relative to Public

Gun.cpp has the same problem. Its header is in a different folder, so it also writes #include "Weapons/Gun.h". A bare #include "Gun.h" only works from a file in the same folder as the header.

It compiled before an engine or settings upgrade. Older build settings added every subfolder of Public, and the module folder itself, as search paths, so #include "Gun.h" worked from anywhere. Current settings do not: raising DefaultBuildSettings in your Target.cs to BuildSettingsVersion.V2 or later turns those legacy paths off. Write the full relative path. As a stopgap while you migrate, bLegacyPublicIncludePaths = true; in the module’s Build.cs restores the old behavior.

A module with no Public and Private folders. Template projects keep their files directly in Source/MyGame. That works while everything is in one folder. Once you add subfolders, the module folder is not a search path under current settings, so #include "Weapons/Gun.h" from a file in Source/MyGame/Player fails. Either move to the Public and Private layout, or add the module folder yourself:

// MyGame.Build.cs
PublicIncludePaths.Add(ModuleDirectory);

The file exists in the IDE and nowhere useful on disk. A header created with Visual Studio’s Add > New Item lands in Intermediate/ProjectFiles unless you change the location in the dialog. It shows in the Solution Explorer and the compiler cannot find it. Move the file into Source/MyGame and regenerate project files.

Private folders and editor-only modules

A header in Source/OtherModule/Private is visible to OtherModule only. Listing OtherModule as a dependency exposes its Public folder and nothing else, so including a private header from another module gives C1083 however you write the path. If the header is yours, move it to Public and add your module’s API macro (for example OTHERMODULE_API) to the classes other modules use. If it is an engine header, it is private on purpose: look for a public header that offers the same feature. Adding an engine Private folder to PrivateIncludePaths can compile, and tends to break at link time or on the next engine update.

Editor modules cause the version of this error that appears only when you package. UnrealEd and other editor modules do not exist in a game build, so a runtime module can depend on them only in editor targets:

// MyGame.Build.cs
if (Target.bBuildEditor)
{
	PrivateDependencyModuleNames.Add("UnrealEd");
}
// MyActor.cpp
#if WITH_EDITOR
#include "Editor.h"
#endif

An unguarded #include "Editor.h" passes every editor build and fails with C1083 the first time the game target is compiled. The code that uses the header needs the same #if WITH_EDITOR guard. Tools that are editor-only from top to bottom belong in a separate module of type Editor.

Case sensitivity and backslashes

Windows file systems ignore case. Linux does not. An include that differs from the real path only by case builds on Windows and fails as soon as the project is compiled on a Linux machine, such as a build server:

#include "components/StaticMeshComponent.h"   // Windows: found. Linux: file not found
#include "Components/StaticMeshComponent.h"   // correct everywhere

Cross-compiling for Linux or Android from a Windows machine does not catch this, because the files are still read from a Windows disk. Backslashes are the same kind of problem: #include "Weapons\Gun.h" works with MSVC and fails on a Linux or Mac host. Use forward slashes and copy the case from the file system. Renaming a file only by case (gun.h to Gun.h) deserves care in Git on Windows, where the rename may not be recorded unless you use git mv.

Confirm the fix

  1. Build from the IDE and read the Output window. Because C1083 is fatal per file, expect to fix one include, rebuild and meet the next.
  2. Build the Development game configuration once, not only Development Editor. It is the quick way to catch editor-only includes before a full package.
  3. If you ship a plugin or share the module, build it in a second project. Paths that only worked because of your project’s layout fail there.

If the next error says a type is undefined or undeclared, the file is now found and the remaining problem is which header you include: see error C2027 and error C2065.

Where Bugnet meets this error

A compile error never reaches Bugnet. C1083 stops the build on your machine before a game exists, so there is nothing to capture and nothing for players to report.

It is, though, an error you can meet while installing Bugnet. The Unreal SDK is two source files you add to your game module, and they include headers from the HTTP, Json, JsonUtilities, ImageWrapper and OnlineSubsystem modules. Leave HTTP out of Build.cs and the first thing you see is C1083 naming HttpModule.h, which is the Build.cs case above. The install script checks your Build.cs and lists the modules it lacks. Once the game builds and runs, the SDK does its real job: fatal errors, failed check and verify and ensure failures are filed with the engine’s error text and recent log lines. Details are in the SDK docs.

Frequently asked questions

What does fatal error C1083 Cannot open include file mean in Unreal Engine?

The compiler could not find the file named in an include on any of the search paths Unreal Build Tool passed to it. Those paths come from your module’s Build.cs and folder layout, not from Visual Studio settings. The usual causes are a module missing from Build.cs, a .generated.h that was never produced, or a wrong relative path.

How do I fix Cannot open include file .generated.h in Unreal?

Check that the header contains a UCLASS, USTRUCT or UENUM, that it sits inside a module’s source folder, and that the include is named after the header file. Look above the error for an Unreal Header Tool error, which stops generation for the whole module. If none of that applies, delete Intermediate and Binaries, regenerate project files and rebuild.

Which module do I add to Build.cs for an engine header?

The module that owns the header, which the class page in the C++ API reference lists next to the include line. For example Blueprint/UserWidget.h needs UMG, AIController.h needs AIModule and NiagaraComponent.h needs Niagara. Add the name to PublicDependencyModuleNames or PrivateDependencyModuleNames and rebuild.

Why does my Unreal project compile on Windows but fail with file not found on Linux?

Linux file systems are case sensitive and Windows file systems are not. An include whose case differs from the real file name, or one that uses backslashes, is found on Windows and not on a Linux build machine. Copy the exact case from the file system and use forward slashes.

Why does C1083 only appear when I package my Unreal project?

The header belongs to an editor-only module such as UnrealEd, which does not exist in a game build. Wrap the include and the code that uses it in #if WITH_EDITOR, and add the editor module in Build.cs only when Target.bBuildEditor is true.

Include paths in Unreal come from Build.cs and the Public and Private folders, never from Visual Studio settings. Read the file name in the message: an engine header means a missing module, and a .generated.h means Unreal Header Tool never wrote it.