0

I'm using below gcc tool chain. gcc version 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496] (GNU Tools for ARM Embedded Processors)

I could create .h.gch file but could not get .h.gch used while buidling .c files. I used -H and -Winvalid-pch options to check the reasons but compiler didn't give any information. Just like .h.gch doesn't exist and always search .h file.

LMG
  • 1
  • How are you adding the file into your compilation process? – Jose May 18 '18 at 07:34
  • Hi Felipe, I'm using the dependency as below: $(DependentObjs):%.o:%.c $(GCPHeader) DependentObjs is a list of C files which include the header file. GCPHeader is the .h.gch file. – LMG May 21 '18 at 03:34
  • The problem is that precompiled header must be the first header file being included by C source code, including the header files listed in C source code and header files provided by gcc command line. – LMG May 21 '18 at 06:26

1 Answers1

0

The problem is that precompiled header must be the first header file being included by C source code, including the header files listed in C source code and header files provided by gcc command line.

LMG
  • 1