Friday, May 05, 2006

compile for debug with gdb

add -ggdb flag in the compile & link command.
eg:
    g++ -c file_one.c -o file_one.o -ggdb
    g++ file_one.o file_two.o -o binary_file -ggdb


No comments: