Problem compiling code

I can’t compile UE4 !

Its complaining that it can’t find some header files (many header files), it appears that many of the header files contain literal paths to a location that doesn’t exist

i.e.
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/===========================================================================
C++ class boilerplate exported from UnrealHeaderTool.
This is automatically generated by the tools.
DO NOT modify this manually! Edit the corresponding .h files instead!
===========================================================================
/
#pragma once

#include “C:/Users/Darryl/Downloads/UE4 - Build 4.0.1/Engine/Source/Runtime/InputCore/Classes/InputCoreTypes.h”

That path doesn’t exist, but there’s a hint that this file is automatically generated by the unrealheadertool

Does anyone know how I can fix this ?

wjones

Try this:

#include “InputCoreTypes.h”

It isn’t asking for the file path just the header file. :slight_smile:

Master kyp,

The file exists, just not at the path mentioned.

#include “C:/Users/Darryl/Downloads/UE4 - Build 4.0.1/Engine/Source/Runtime/InputCore/Classes/InputCoreTypes.h”

As someone who has dabbled in C programming, I’d expect to see a relative path to the header file not an absolute, everything from “UE4 - Build 4.0.1” on-wards exists, but everything prior to that the “C:/Users/Darryl/Downloads” doesn’t I’d happily go in there and change it… only it looks like the path is automatically generated, whats caused this strange path to exist ?

I don’t have a “switch Unreal Engine Version” shell command only a "generate visual studio project files.

My register shell commands bat file doesn’t mention it either… :frowning:

@echo off

pushd …
set UE_ROOT_DIR=%CD:=\%
set UE_ROOT_DIR_SINGLE_SLASHES=%CD%
popd

reg delete HKEY_CLASSES_ROOT.uproject /f
reg add HKEY_CLASSES_ROOT.uproject /d “Unreal.ProjectFile”
reg add HKEY_CLASSES_ROOT.uproject /v “Content Type” /t REG_SZ /d “text/Unreal”
reg add HKEY_CLASSES_ROOT.uproject /v “PerceivedType” /t REG_SZ /d “Text”

reg delete HKEY_CLASSES_ROOT\Unreal.ProjectFile /f
reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile /d “Unreal Project File”
reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile\DefaultIcon /d “%UE_ROOT_DIR%\Engine\Binaries\Win64\UE4Editor.exe”

reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\open /d “Open”
reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\open\command /t REG_SZ /d “”%UE_ROOT_DIR%\Engine\Binaries\Win64\UE4Editor.exe" “%%1"”

reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\run /d “Launch Game”
reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\run\command /t REG_SZ /d “”%UE_ROOT_DIR%\Engine\Binaries\Win64\UE4Editor.exe" “%%1” -game"

reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\rungenproj /d “Generate Visual Studio projects”
reg add HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\rungenproj\command /t REG_EXPAND_SZ /d “%%comspec%% /c “%UE_ROOT_DIR_SINGLE_SLASHES%\Engine\Build\BatchFiles\GenerateProjectFiles.bat -project=”%%1” -game -engine""

Try running /Engine/Binaries/Win64/UnrealVersionSelector-Win64-Shipping.exe

Zeblote

Can’t find UnrealVersionSelector - win64-shipping.exe anywhere in my unreal directory tree… :S

Which version are you using?

I think its 4.0.1 I know 4.1 is out but I’d rather learn on something not changing as I go, so I’ll update when there’s a major upgrade.

Sounds like quite the pickle. In truth you would be doing yourself a favor to update your engine to 4.1. Anyways, in your compiler you could manually add the path. c/c++ : header file not found - Stack Overflow

Now if i’m understanding you correctly you’re saying that the file DOES exist since you’ve literally opened up the folder and have seen it yourself but the compiler doesn’t want to recognize that it’s there? This might be obvious but I hope you’re using Visual Studio 2013 and not 2012 since this is starting to sound more like a linker issue.

If not just let us know that the issue is still going on oh and give us the error number that the compiler gives, i’d imagine there’s up to at least 10+ warnings but a few errors.

Master Kyp

The header files that its complaining about exist… just not where the automaticly header file says they are.

Example to explain

SlateClasses.h

Contains…

#include “C:/Users/Darryl/Downloads/UE4 - Build 4.0.1/Engine/Source/Runtime/Slate/Classes/SlateTypes.h”
#include “C:/Users/Darryl/Downloads/UE4 - Build 4.0.1/Engine/Source/Runtime/Slate/Classes/SlateWidgetStyleContainerInterface.h”
#include “C:/Users/Darryl/Downloads/UE4 - Build 4.0.1/Engine/Source/Runtime/Slate/Classes/SlateWidgetStyleContainerBase.h”
#include “C:/Users/Darryl/Downloads/UE4 - Build 4.0.1/Engine/Source/Runtime/Slate/Classes/SlateWidgetStyleAsset.h”
… and more but you get the idea.

All of those header files exist, they are under

D:\Apps\New folder (3)\UE4 - Build 4.0.1\UE4 - Build 4.0.1

NOT

C:/Users/Darryl/Downloads/

Now traditionally, I’d just edit SlateClasses.h so it pointed to the correct place, however the comment at the top of SlateClasses.h says its an automatically generated file and not to edit it ! also the path to SlateClasses.h is

D:\Apps\New folder (3)\UE4 - Build 4.0.1\UE4 - Build 4.0.1\Engine\intermediate\build\Win64\Inc\slate\slateclasses.h

The intermediate in the path also makes me believe that the file was generated automatically, but generated incorrectly so I need away of telling whatever is writing those automatically written headers that my files are actually somewhere else !!

Does anyone know which bit of UNREAL is writing them ? and how to change it ?

D’oh

I feel pretty stupid. All i needed to do was a “clean” that cleared out the troublesome “intermediate” files. Now I can rebuild the UE4 project, my own project is now missing its nil file, any ideas ?