gcc - Not getting debugging symbols to be generated -
i using make , debugging symbols not getting generated. here makefile:
program: ui.o data.o string.o c99 -ggdb -o program2 ui.o data.o string.o clean : rm -f program2 ui.o : ui.c data.h c99 -ggdb -c ui.c data.o : data.c data.h c99 -ggdb -c data.c string.o : string.c string.h c99 -ggdb -c string.c how can generate debugging symbols? when run gdb using gdb program2 gives warning "no debugging symbols found".
- your
makefilebuildsprogram2, pretends buildprogram(i.e. target on first line wrong). - your
cleantarget should clean*.o, otherwisemake clean; makerelinkprogram, not recompile objects in it.
one of above factors explanation missing debug symbols you've observed.
Comments
Post a Comment