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"

How to recompile specific PCH.h file?

Hi all,

I really often have an error like the one below:

fatal error: file '/usr/include/linux/sysctl.h' has been modified since the precompiled header '/path/to/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealLightmass/Development/Core/CorePrivatePCH.h.gch' was built note: please rebuild precompiled header '/path/to/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealLightmass/Development/Core/CorePrivatePCH.h.gch'

In order to solve this error, what I normally do is REMOVE ALL .gch files with:

 for f in $(find /path/to/Unreal -name "*.gch"); do rm -v $f ; done 

After this I compile the project again. Although this approach works, the compilation takes ages, because undoubtedly I'm removing .gch files that don't need to be removed.

What I would like to do is recompiling only those specific PCH.h files independently, so that when compiling my project I won't have this error.

Is there a way to recompile only specific .h files in Unreal?

Thank you very much for any help.


Only removing those specific .gch files won't solve my problem because if I remove one and compile my project again, after 10 minutes compiling clang will probably complain about a different .gch file which needs to be rebuilt.

What I'm planning to do is creating a test_X_.cpp for each PCH.h file ( _X_ is the name of the PCH.h file)

Each test_X_.cpp would be compiled before compiling my project to detect whether a specific PCH.h file needs to be recompiled. The test_X_.cpp would contain only the header file. Something like:

 #include "_X_.h"
 int main() { return 0; }
Product Version: UE 4.20
more ▼

asked Nov 06 '18 at 02:53 PM in C++ Programming

avatar image

Ruben Alves
20 5 10 13

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

0 answers: sort voted first
Be the first one to answer this question
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