What is a .h.gch file?

后端 未结 5 1699
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 11:51

I recently had a class project where I had to make a program with G++.

I used a makefile and for some reason it occasionally left a .h.gch file behind.

So

5条回答
  •  一生所求
    2020-12-04 12:24

    A .gch file is a precompiled header.

    If a .gch is not found then the normal header files will be used.

    However, if your project is set to generate pre-compiled headers it will make them if they don’t exist and use them in the next build.

    Sometimes the *.h.gch will get corrupted or contain outdated information, so deleting that file and compiling it again should fix it.

提交回复
热议问题