Precompiled definitions are not fooling your pch thingy

I have added a Precompiled definition to my project:


JIMMYT1988_CONFIG_INCLUDE="$(SolutionDir)Source\TemplatePlatformer\Public\TemplatePlatformer.h"

The reason is that all my cpp files have to have that pch included… including my project hetrogeneous code… that’s why i wanted to have one configuration file that knew where the pch is for the project, and just call that macro instead:

for example:

this:

MyClass.cpp


#include "./../../../Public/TemplatePlatformer.h"
#include "MyClass.h"

...

MyClass2.cpp


#include "./../../../Public/TemplatePlatformer.h"
#include "MyClass2.h"

...

would become this:

MyClass.cpp


INCLUDE_CONFIG
#include "MyClass.h"

...

MyClass2.cpp


INCLUDE_CONFIG
#include "MyClass2.h"

...

This is not fooling the pch though, i’m still getting this **** error:



Error	6	
error : All source files in module "TemplatePlatformer" must include the same precompiled header first.  
Currently "E:\Documents\Unreal Projects\TemplatePlatformer\Source\TemplatePlatformer\Public\TemplatePlatformer.h" is included by most of the source files.  
The following source files are not including "E:\Documents\Unreal Projects\TemplatePlatformer\Source\TemplatePlatformer\Public\TemplatePlatformer.h" as their first include:	
E:\Documents\Unreal Projects\TemplatePlatformer\Intermediate\ProjectFiles\EXEC	TemplatePlatformer

Error	7	
error MSB3073: The command "
"C:\Program Files\Unreal Engine\4.6\Engine\Build\BatchFiles\Rebuild.bat" 
TemplatePlatformerEditor Win64 DebugGame 
"E:\Documents\Unreal Projects\TemplatePlatformer\TemplatePlatformer.uproject" -rocket
" exited with code 2.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets	

43	5	TemplatePlatformer


This was the issue: Compilation error when referencing ULocalPlayer - C++ - Unreal Engine Forums

I removed the include in one of my files: “LocalPlayers.h”

and replaced with “Engine.h”

phewwioeee, that was a **** error :smiley: