**** a question on gprof ****

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Aug 31 07:31:22 AEST 1990


In article <727 at babcock.cerc.wvu.wvnet.edu> siping at cathedral.cerc.wvu.wvnet.edu (Siping Liu) writes:
>the linker tells me "Undefined symbol: mcount" after I put
>in -p as a C flag. What lib/header files I need to add in?

NO changes to the source code whould be required.
However, for profiling, you should specify -p to the "cc" command
that does the linking as well as to the ones that do the compiling.
(Actually, if you leave it out the objects should still link but no
profiling output will be obtained.  It sounds like the C run-time
implementor goofed here.)

gprof may require -pg or some other silly flag instead of the usual -p.



More information about the Comp.unix.questions mailing list