Download

C1083: cannot include header file

Hey guys,

I am struggling with this error wich seems to not have any solution or workaraund. Someone may ask if I am sure that there isn’ t a typo on the inclusion, but this is (sadly) not my case. I very rarely jump into forums or answerhub to see if someone can help me, I usually work out myself how to solve the issue basing on what the people who had this issue before writes, BUT here i really think the only possibility is to ask other people for help.
I tried solving this issue looking at all the prexeding cases. Once i got that inclusion bt just re starting my PC. Once by modifying the VC++ directories paths as suggested by other users. I checked there were no non-ascii chars on my user name ecc… But now nome of this things seems to work. This issue tool me 5 hours of investigation and experiments, but the error is still here. I have heard of a workarauond consisting on changing the WITH_VSEXPRESS on the visual studio accessor build.CS file, but things seems to have changed a bit here… I see VisualStudioSourceCodeAccessor instead of VSAccessor, and I can’ t find that macro. I really hope someone who has the same problem or an epic staff guy could help me with this problem, because I do really need this kind of help to continue my work.
I’ d appreciate if people experiencing the same problem could write a line here so that maybe we could receive some more attention. Thanks in advance for any reply!

Need more information to have any hope of helping you. The compile/build log for starters.

The entire compilation log:

LogVSAccessor:Warning: Couldn’t access Visual Studio
LogD3D11RHI: InitD3DDevice
Recompiling FE…
Launching UnrealBuildTool… [C:/UNREAL ENGINE 4/Epic Games/4.8/Engine/Binaries/DotNET/UnrealBuildTool.exe FE -ModuleWithSuffix FE 3118 Win64 Development -editorrecompile -canskiplink “C:/Users/Aramini/Documents/Unreal Projects/FE/FE.uproject” -rocket -rocket]
Warning: Starting HotReload took 0.0s.
CompilerResultsLog: New page: Compilation - Sep 8, 2015, 10:38:11 AM
CompilerResultsLog: Info Compiling game modules for hot reload
CompilerResultsLog: Info Performing 27 actions (3 in parallel)
CompilerResultsLog: Info PCH.FE.h.cpp
CompilerResultsLog:Error: Error C:\Users\Aramini\Documents\Unreal Projects\FE\Source\FE\Public\FE.h(20) : fatal error C1083: Cannot open include file: ‘FETypes.h’: No such file or directory
CompilerResultsLog: Info -------- End Detailed Actions Stats -----------------------------------------------------------
CompilerResultsLog: Info ERROR: UBT ERROR: Failed to produce item: C:\Users\Aramini\Documents\Unreal Projects\FE\Binaries\Win64\UE4Editor-FE-3118.dll
CompilerResultsLog: Info Total build time: 32,50 seconds
LogMainFrame: MainFrame: Module compiling took 32.897 seconds
Warning: HotReload failed, recompile failed

The first line seems to be telling something that regards me

Thx again for your assistance!

PS:My configuration is set to development editor

The warning is triggered at line 399 or 438 of VisualStudioCodeAccessor.cpp

on “FVisualStudioCodeAccessor::OpenVisualStudioFilesInternalViaDTE”
or in “FVisualStudioSourceCodeAccessor::SaveAllOpenDocuments”

Ok so I tried to recompile but now launching VS fom the editor.

I didn’t get that warning, but the error is still there

LogD3D11RHI: InitD3DDevice
Recompiling FE…
Launching UnrealBuildTool… [C:/UNREAL ENGINE 4/Epic Games/4.8/Engine/Binaries/DotNET/UnrealBuildTool.exe FE -ModuleWithSuffix FE 9904 Win64 Development -editorrecompile -canskiplink “C:/Users/Aramini/Documents/Unreal Projects/FE/FE.uproject” -rocket -rocket]
Warning: Starting HotReload took 0.1s.
CompilerResultsLog: New page: Compilation - Sep 8, 2015, 10:48:38 AM
CompilerResultsLog: Info Compiling game modules for hot reload
CompilerResultsLog: Info Performing 27 actions (3 in parallel)
CompilerResultsLog: Info PCH.FE.h.cpp
CompilerResultsLog:Error: Error C:\Users\Aramini\Documents\Unreal Projects\FE\Source\FE\Public\FE.h(20) : fatal error C1083: Cannot open include file: ‘FETypes.h’: No such file or directory
CompilerResultsLog: Info -------- End Detailed Actions Stats -----------------------------------------------------------
CompilerResultsLog: Info ERROR: UBT ERROR: Failed to produce item: C:\Users\Aramini\Documents\Unreal Projects\FE\Binaries\Win64\UE4Editor-FE-9904.dll
CompilerResultsLog: Info Total build time: 33,59 seconds
LogMainFrame: MainFrame: Module compiling took 33.895 seconds
Warning: HotReload failed, recompile failed

I’ve tried updating to 4.9, but I do still get the same error (together with the other pretty trivial conversion errors)

The error states that FETypes.h does not exist. Is it in the right place when you open your source directory within the windows explorer? If so can you post snippets from FE.h with the include and FETypes.h with the includes?

Yes, it is in the correct place, in FE/Source/Private/ since it is supposed to be used privately only on the game’s module.

This is FE.h

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.

#ifndef FE_H
#define FE_H

#include "Engine.h"

#include "Runtime/UMG/Public/UMG.h"
#include "Runtime/UMG/Public/UMGStyle.h"
#include "Runtime/UMG/Public/Slate/SObjectWidget.h"
#include "Runtime/UMG/Public/IUMGModule.h"
#include "Runtime/UMG/Public/Blueprint/UserWidget.h"

#include "ParticleDefinitions.h"
#include "SoundDefinitions.h"
#include "Net/UnrealNetwork.h"

#include "Kismet/GameplayStatics.h"

    #include "FETypes.h" <------ fatal error C1083: Cannot open include file: 'FETypes.h': No such file or directory


/** when you modify this, please note that this information can be saved with instances
* also DefaultEngine.ini [/Script/Engine.CollisionProfile] should match with this list **/
#define COLLISION_PROJECTILE	ECC_GameTraceChannel1
#define MAX_PLAYER_NAME_LENGTH 16


/** Set to 1 to pretend we're building for console even on a PC, for testing purposes */
#define FE_SIMULATE_CONSOLE_UI	0

#if PLATFORM_PS4 || PLATFORM_XBOXONE || FE_SIMULATE_CONSOLE_UI
	#define FE_CONSOLE_UI 1
#else
	#define FE_CONSOLE_UI 0
#endif

#endif

Thats the problem I think. Things in a private folder can only be included by other things in the private folder but not by things in the public folder. Please refer to this:

https://answers.unrealengine.com/questions/20310/explanation-of-source-code-folder-structure.html

I already tried putting the header into the public subfolder, but I get the same exact error

I found a way to escape this error (but keep in mind this is not a definitive solution, since I already tried doing several times and this and it didn’t work).

-I Created a new class with the wizard
-Included its header where it was needed (FE.h)
-Compiled without errors
-Deleted the classe’s corresponding cpp file and the class declaration itself and put what I wanted to put into that header

Btw. did you put FETypes.generated.h into FETypes.h? Without that it would not compile (at least that was the case in my own project)

Yes, I did.