Precedence of -D MACRO and #define MACRO

后端 未结 5 670
情歌与酒
情歌与酒 2021-01-11 14:24

If I have a C file foo.c and while I have given -DMACRO=1 as command line option for compilation. However, if within the header file also I hav

5条回答
  •  孤独总比滥情好
    2021-01-11 15:22

    manual says: first all -D and -U are evaluated in order and then all -includes (under section -D)

    best way: try it out.

提交回复
热议问题