在文件的编译中一定要加上 -g,注意生成。o和可执行文件的编译语句中都要加上 -g
1 all: test.o
2 g++ -g -o test test.o3
4 test.o:test.cpp
5 g++ -g -c test.cpp
6
7 .PHONEY:clean
8 clean:
9 rm -f *.o
在文件的编译中一定要加上 -g,注意生成。o和可执行文件的编译语句中都要加上 -g
1 all: test.o
2 g++ -g -o test test.o9 rm -f *.o