How to stop huge Prefix.pch.gch file from being copied into application bundle

前端 未结 5 421
醉梦人生
醉梦人生 2021-01-19 10:30

For some reason, XCode has decided to start copying a huge Prefix.pch.gch file into my application\'s resources folder when building. This file is not in the Copy Bundle Re

5条回答
  •  不思量自难忘°
    2021-01-19 10:51

    I solved this problem in a different way. Firstly I like to make use of the prefix file so I have lots of includes for standard logging, colours etc.

    For every include to the prefix file ensure that each include is only processed once! This can be done by putting:

    #ifndef ____
    #define ____ 
    
    < your original header file here >
    
    #endif
    

提交回复
热议问题