Why do we store -D in others c Flags in xcode

why do we use -D in another ff. in the target right-click, go to get information in the assembly settings for other c-flags, why should we write -D like -DDEBUG

+3
source share
2 answers

-Dis the gcc flag for setting a #define. You can also do things like -DTWO=2that which has the same effect as #define TWO 2.

+6
source

I know this is an old question, and you already understood this, but here is the reason for the flag.

, -D #define . , -DDEBUG, , , /, . #ifdef DEBUG, , DEBUG, , .

Xcode / .

#ifndef DEBUG , , , , .

+1

Source: https://habr.com/ru/post/1781647/


All Articles