In GCC, can precompiled headers be included from other headers?
问题 When I compile a c++ file that includes a precompiled header, everything works as expected // test.c++ #include <precompiled.h> #include <header.h> main() {} > g++-4.7 --std=c++11 BLAH... test.c++ -H 2>&1 | grep precompiled.h ! precompiled.h.gch (! means that gcc found and used the precompiled header) However, when I put #include < precompiled.h > into header.h, it doesn't work: // test.c++ #include <header.h> main() {} > g++-4.7 --std=c++11 BLAH... test.c++ -H 2>&1 | grep precompiled.h .