Ste*_* Lu 27 c c++ debugging gcc
我一直在使用这样的东西:
int main(int argc, char *argv[])
{
#ifdef DEBUG
printf("RUNNING DEBUG BUILD");
#else
printf("Running... this is a release build.");
#endif
...
Run Code Online (Sandbox Code Playgroud)
但是,这需要我使用-DDEBUG进行编译以进行调试构建.GCC是否为我提供了一些方法来确定何时使用调试符号(-g标志)进行编译,例如定义我自己可以检查的预处理器宏?
| 归档时间: |
|
| 查看次数: |
40759 次 |
| 最近记录: |