I\'m trying to profile a C++ application with gprof on a machine running OSX 10.5.7. I compile with g++ in the usual way, but using -pg flags, run the application and try to
Btw, do you fork() in your code? If so, add this in the child process just after the fork():
extern void _start (void), etext (void); monstartup ((u_long) &_start, (u_long) &etext);
That did the trick for me.