xcode - New build settings with LLVM Compiler on macros -


i created new cocoa project on xcode 4.3.3. preprocessor macros apple llvm compiler 3.1 settings have debug=1 $(inherited) value assigned. removed , add again, , i'm getting error when compiling :

clang: error: no such file or directory: 'debug=1'

i search value on project settings , saw value defined in "other warning flags"

my questions are:

  1. what difference between having debug vs debug=1?
  2. what $(inherited) do?
  3. what doing on other warning flags?

first, if you're getting compilation error, put macro in incorrect place in project settings. please ensure you've put debug configuration branch of preprocessor macros item under apple llvm compiler x.x - preprocessing section.

for other questions:

  1. the first version defines macro debug it's empty. can test whether exists or not exist, not much. second sets 1 preprocessor can comparisons #if debug && should_die_on_error might abort if application comes across validation error, if should_die_on_error set , 1 , you're running in debug mode.
  2. the $(inherited) brings in other macros you're inheriting further chain. if project defines items , target defines more, target gets project's settings without having re-define them.
  3. it shouldn't effecting warning flags @ all. if anything, determines code paths in header files include (like cocoa frameworks) may use different implementations things or may add debugging information data structures, or whatever.

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -