I build my project with "./configure CFLAGS=-g3" , also tried "make CFLAGS=-g3". when I load slim.exe with ddd, it say no debug symbols are found.
How can I create slim.exe with debug symbols, and I load it to ddd and perform debugging?
is there any chance that debug is disabled in configure.ac ?
I am not familiar with automaketools and Linux, now using cygwin on windows. I searched solutions, but failed.
could anyone point out my mistakes? many thanks in advance
Assuming your compiler is gcc, the option to enable debug output is -g
, there's no number after it. It looks like you're confusing it with the optimization flag family -O1
and so on.
Also, to set the environment variable, you need to do it before running the command, in general:
$ CFLAGS=-g make
And with autoconfig, it's ususally an option:
$ ./configure --enable-debug
You can run ./configure --help
to view the available options, and since configure
will lead to Makefile(s) being created, you must always do it before trying to build the project by running make
.
The sequence is, typically:
cd project
./configure --help
to review the options, look for --enable-debug
./configure --enable-debug
to run the autoconfig script, creating Makefile(s)make