VS Error: Must include same precompiled header first

Hi,

I’m trying to add code through the solution explorer directly, but every time I try and then compile I get:

Error 1 error : All source files in
module “CarGame” must include the same
precompiled header first. Currently
“C:\Users\Rob\Documents\Unreal
Projects\CarGame\Source\CarGame\Public\CarGame.h”
is included by most of the source
files. The following source files are
not including
“C:\Users\Rob\Documents\Unreal
Projects\CarGame\Source\CarGame\Public\CarGame.h”
as their first
include: C:\Users\Rob\Documents\Unreal
Projects\CarGame\Intermediate\ProjectFiles\EXEC CarGame

Are you sure all your cpp files include your CarGame.h header file and not any other game module header file ?

Yeah they all definitely do. To add some context, I’m using code from a SDK for a controller I’m trying to get working. I tried adding the include to all of their cpp files but the error code is the same.

As a follow up question, if I’m adding external code to my project (headers and source), is there anything I need to do in addition to just adding them in the project explorer?