x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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

Product Version: Not Selected
Tags:
more ▼

asked Aug 01 '14 at 11:10 PM in C++ Programming

avatar image

Boercam
6 2 3 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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

more ▼

answered Aug 01 '14 at 11:13 PM

avatar image

darkZ
263 19 21 38

avatar image Boercam Aug 01 '14 at 11:20 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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?

more ▼

answered Aug 02 '14 at 11:16 PM

avatar image

Boercam
6 2 3 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question