Can I remove the Prefix.pch file from an Xcode project?

The Xcode project automatically creates the Prefix.pch file. When I deleted this file and tried to build, I had a build error in which the "* _Prefix.pch" file was missing.

  • Is the Prefix.pch file required to compile with Xcode?
  • How can I create without a Prefix.pch file?
+36
xcode precompiled-headers
Jan 18 '11 at 19:36
source share
2 answers

In Xcode, go to your target build settings (Command-Option-E tab) and uncheck Precompile Prefix Header (GCC_PRECOMPILE_PREFIX_HEADER). You can also remove the value of the Prefix Header parameter if you wish.

The prefix headers are compiled and stored in the cache, and then automatically included in each file at compile time. This can speed up compilation and allows you to include a file without adding an import statement to each file using it. They are not required, and in fact slow compilation whenever you change them.

+58
Jan 18 '11 at 19:46
source share

Yes, you can compile and run the project without a .pch file. In Xcode, go to your target build settings (Command-Option-E, build tab) and uncheck the Precompile Prefix Header (GCC_PRECOMPILE_PREFIX_HEADER). You can also remove the value of the Prefix Header parameter if you wish.

0
Nov 04 '16 at 11:12
source share



All Articles