Here are the steps for OS X. These are pretty rough.
Go to GraphViz
Download GraphViz. install GraphViz into /Applications ln -s /Applications/Graphviz.app/Contents/MacOS/dot /usr/local/bin/dot go to CodeViz Download CodeViz download
Untar codeviz In the codeviz directory ./configure make
Wait for it to break. It does not configure right for OS X and is missing the #defines for things like limits.h and stdlib.h. I could not figure out which of the various config.h files was wrong so I just patched the sources.
It also uses a version of mktemp that takes an optional parameter. Some mktemps require /tmp/tmp.XXXXXXXXXX. Modify the Makefile if need be.
warning: If you type make in this directory then it will redownload gcc 3.4.1 and you have to start ALL over. Make sure you type make in codeviz/compilers/gcc-graph/objdir
I had to fix about 3 or 4 files.
Next you have to set your compiler to be /usr/local/gccgraph/bin/gcc
Compile your sources and you end up with a .cdefn file per source file compiled.
Get viz-duct-tape by cvs
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/viz-duct-tape login The password is empty cvs -d:pserver:email@example.com:/cvsroot/viz-duct-tape co viz-duct-tape cd viz-duct-tape jam jam -sCALLGRAPH=1 Rel/viz-duct-tape *.cdepn > myOutput.dot
Run viz-duct-tape and you get a dot file. This will be large and annoying because it contains way too many system calls. I read in two files and if there is any match of the substring I skip that link.
Create a file called SkipFile. I put this in my SkipFiles
include/c++/3.4.1 /usr/include /usr/local/gccgraph
Create another file called SkipFunction. I put this in my SkipFunctions
boost auto_ptr Mutex Exception __cxa with operator delete _DebugPrintf
Run cdepnToDot on all your .cdepn files.
Open the dot file in GraphViz.
As an example, you can type jam -sCALLGRAPH=1 in the viz-duct-tape folder to create the following graph