Dave Steffen wrote: > pemo <[EMAIL PROTECTED]> writes: > >> On May 13, 4:34 pm, Paul Pluzhnikov <[EMAIL PROTECTED]> >> [...] >> >> Could you clarify it's neither a .h/.cpp? The source code behind the >> vector template has to be compiled, and thus found. Intuitively, I >> would expect this be be in some include path, i.e., as vector is >> included in her source, the template boiler plate has also to be >> 'included' somehow. This seems *not* to be the case however, so I'm >> curious as to how the code 'arrives' for compilation. > > The code is there, almost certainly in a file called "vector" (no .h > or .cpp suffix). That file almost certainly #includes some others > that you'll want to look at. But again, it's not compiled into a > library, because templates don't work that way. > >> Ok, but can you say whether after doing this [away from her machine >> at the mo] whether gprof requires some explicit input, e.g. gprof >> a.out? > > To use gprof, compile with the right flags (-pg IIRC) and just run > the thing. It produces an output file, which you then feed to the > gprof program. Further instructions can be found on line. > > A further note: gprof output isn't particularly easy to work with, > especially in C++ code. VTune is probably more useful. Also, for > Linux systems, check out Valgrind (specifically the callgrind and > cachegrind tools) and KCacheGrind, a KDE app that IMHO puts VTune to > shame.
Many thanks to you both. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus