-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 14 October 2002 08:44, Keith Robinson wrote:
> I am sure this is a painfully easy question:
>
> I am installing a progam from source. How do i compile it so that
> later I can run debug it with gdb? I've tried alias gcc='gcc -g'
> (from bash) but that doesn't  work. I've tried setting CC = gdd
> -g in the Makefile, but that doesn't work, at least doesn't
> appear to.

some configure scripts come with a debug enabling flag. you may want to look 
for one.

barring that, you can often do:

  CC='gcc -g'; ./configure

or you can hand hack the Makefile, as you appear to have attempted. the CC= 
line is often, but not always, what ends up getting used. you may need to do 
a search in the file for where "gcc" appears and append a -g to it at each 
location. also remember that you will need to do this for each Makefile in 
each subdirectory, if there are any. which is why doing it w/configure is so 
much nicer =)

oh, and just to ask the silly question: this is a C program and not a C++ 
program or some such, right?

- -- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

"Everything should be made as simple as possible, but not simpler"
    - Albert Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9q4dt1rcusafx20MRAgGzAJ99AB6rAqsEVMEawCbSgsHqoEYHewCfVv8R
8bBCijUDDgCbfD2IBolNGYg=
=BC5o
-----END PGP SIGNATURE-----

Reply via email to