Add preprocessor macro to a target in xcode 6

梦想的初衷 提交于 2019-11-26 13:05:14

问题


Probably this is pretty simple, but I can\'t find a way to define a preprocessor macro for a target in Xcode 6.


回答1:


I've done a screenshot to show where it is in Xcode, because it's easier :)

  1. Select project file
  2. Select the target you want
  3. Go to Build Settings
  4. Search for 'preprocessor'
  5. Add your preprocessor macro either for Debug, Release, or both.



回答2:


In Xcode 9 you have to add a preprocessor macros to Project, not Target. Also don't forget to add "D" as the firs letter. For example, "DDebug", then it works.



来源:https://stackoverflow.com/questions/26928622/add-preprocessor-macro-to-a-target-in-xcode-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!