【软件】CentOS安装使用g++、gdb
Linux C
yum install gcc-c++
g++ -o main -O0 main.c -g
intrusive way:
#define Debug 1
#if Debug
printf();
fflush();
#endif
gdb way:
- tell compiler to record variables' name
- tell compiler to turn off optimizations(can be set in Makefile)
from Chu