title: Profiling g++ app on MacOSX?
body: <p>My standard Linux way of profiling app is:</p>
  
  <pre><code>1) compile with g++ -pg
  2) run prog
  3) gprof
  </code></pre>
  
  <p>Apparently gprof is broek on MacOSX 10.5, and I am supposed to use Shark. All the tutorials I've found aby Shark involves XCode (whereas my build is done with Makefiels and g++).</p>
  
  <p>Can someone post step by step instructions for using shark on an app built with g++? Say something like:</p>
  
  <pre><code>int main() { while(1); }
  
  g++ blah.cpp -o blah; do I need to give it more command line arguments?
  
  how do I use shark here?
  </code></pre>