man gcc :
[-Dmacro[=defn]...] [-Umacro]
GCC -Ddebug=yes a.c
相当于在a.c中
#define debug yes
当然也可以在Makefile中 CFLAGS += "-Ddebug=yes"
编译调试指令:
#error "this is an error"
#warning "this is a warning"
man gcc :
[-Dmacro[=defn]...] [-Umacro]
GCC -Ddebug=yes a.c
相当于在a.c中
#define debug yes
当然也可以在Makefile中 CFLAGS += "-Ddebug=yes"
编译调试指令:
#error "this is an error"
#warning "this is a warning"
转载于:https://my.oschina.net/plp626/blog/174137
1113

被折叠的 条评论
为什么被折叠?