File with extension.gch
refers to the precompiled header of GCC, and one way to generate them is by passing a header file, .h
, as a source to the compiler. 3
Using it is transparent to the developer, since the compiler, when it finds#include "arquivo.h"
, first check if there is noarquivo.h.gch
in the same way, and only in the absence of it, interprets thearquivo.h
. 4
NOTE
The pre-compiled header (English acronym, PCH, for pre-compiled header) is a important tool to decrease build time complex projects with many files. But must obey some rules so that this gain can be achieved, or in some cases, they will even have a higher build time than not using it. 5 6
Broadly, small projects do not require such a resource, therefore, if in a project created by you appears a pre-compiled header that you are not aware of, try to configure its compilation, refraining from using the resource. 7