.gch extension

Hi there. I have a few header files in my directories where I run my .c and .cpp codes. I just noticed that the g++ compiler generated empty files with .gch extension, e.g.:

If I have file complex.h it will add a file complex.h.gch. It has generated a few files like this. What is it all about?

Thanks, - Alex

A .gch file is precompiled header, if one of these isn't found the normal header will be used instead. I don't know why its giving you empty ones, though.
I am not sure they are empty, honestly, but when I open them with gedit I cannot see any characters at all although the background changes color in a way that gedit never does if you just open an empty file. I have Ubuntu 12.04 as the OS.

Thanks, - Alex
Topic archived. No new replies allowed.