These are my notes about getting doxygen to build from source under Windows XP, using the DOS command line. It's a pain in the butt, and if you don't need to build doxygen from source on Windows, I don't recommend that you bother with this. Doxygen is much easier to build and modify under linux.

First, you will want to be able to get a fresh command prompt (it's supposedly not really DOS anymore) with a keyboard shortcut, rather than having to go to the Start Menu, toggle through programs, etc. I had it down to two steps by pressing Win-r, which gets the run prompt, I often type cmd to get the command prompt, so this was two "keystrokes", Win-r, Enter but I wanted it down to a single keystroke. My discovery, making Windows system-wide shortcuts requires a pre-existing shortcut to the executable either be in the Start Menu or on the Desktop. Since most things I want to run have a shortcut buried in the Start Menu, I just modify those.

screenshot of dos shortcut

To set the hotkeys that will start the program of your desire, find an existing shortcut (or make one), then right-click on it and choose Properties. The command prompt shortcut is in Start Menu -> Programs -> Accessories. With the new dialogue window up, click or select the text box labeled Shortcut key (which should say None), then press the key sequence you would like to map to this action. If you choose an action that is already reserved by the system, for instance, Win-r, it will deny your choice and leave None as your Shortcut key. Also, the Win key seems to not be set-able. If somebody knows how to set the Win key as part of a shortcut, let me know. When I pressed it, it changed to Ctrl-Alt

Now you need doxygen source code, which comes in tar.gz format. I have WinRar installed, which opens this flawlessly. You can get WinRar from here. With the tar.gz properly extracted, you need to build the source code. You can try launching a command prompt with your new shortcut, cd-ing to the directory where you extracted the source code and typing make. This will probably fail. I recommend following the instructions from the doxygen website, even though those directions are incomplete.

You will also need a C++ compiler. I already had Microsoft Visual C++ 2003 .net, which is apparently part of Microsoft Visual Studio 2003 .net. This comes with its own libraries and utilities, most of which are useless from the command line until you make several changes.

According to the aforementioned instructions, you need several things that effectively require you to install CygWin. You will need the installer, which prompts for where to save the files, where to grab install files from, and then gives you lots of choices about things you may or may not want as part of your installation. I've reused the installer several times, in the process of getting my Cygwin installation to have everything that I wanted. For building doxygen, Cygwin needs to have the basic things automatically included, plus tetex (if you want latex output), perl, sed, awk, flex, and bison. These are buried in categories by default, but there is an option to view all packages alphabetically. I recommend choosing this option rather than digging through every category looking for the packages you need.

When finished installing CygWin, you will need to make sure you can reach the CygWin binaries from the DOS prompt. You will need to make changes to the default PATH. These changes are made by reaching the System Properties. This dialogue box can be reached several ways. One way is to right-click on My Computer and choose Properties. You will get a dialogue called System Properties. Flip to the tab labeled Advanced.

System Properties dialogue

Then choose Environment Variables. Then sort through the choices in the lower pane of the screen to find PATH, and then edit it.

editing the PATH environmental variable

You will need to enter the path to the CygWin binaries in the PATH. The PATH elements are delimited by semicolons. After saving this change, you should launch a command prompt using your new hotkey and test that these binaries are reachable from the prompt. Typing bison should say
bison: missing operand after bison
Try bison --help for more information.
If this doesn't work, make sure that you've opened a new prompt after saving your change to the PATH, or the shell will still be using the old path.

As of this writing, CygWin does not explicitly support Graphviz, which is needed by Doxygen if making call graphs. The whole reason I'm using Doxygen is to get callgraphs, so this was essential for me. This link suggests that it is not only necessary to grab Graphviz for Windows, but to also copy the Times truetype font into a directory where dot will be able to find it. I have done this just in case by copying C:\windows\fonts\times.ttf to C:\cygwin\usr\X11R6\lib\X11\fonts\TrueType. In my case, the TrueType folder did not exist, so I made it. I retrieved the Windows binary for Graphviz from here. After running the binary installer and accepting the defaults, the actual binaries needed for the command line were dumped into C:\Program Files\ATT\Graphviz\bin. I then added this to my PATH, using the procedure described above.

Finally, you will need to make sure that the MS C++ compiler is reachable, along with the paths to the libraries the compiler will need. The aforementioned instructions don't mention this, but a good way to make sure these libraries are reachable is to run vcvars32.bat, which is hidden in some subdirectory of your Microsoft Visual Studio installation. I recommend running a Find for it. Mine was in C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin. This path should be part of your PATH. If it is not, go back to the Environmental Variables dialogue and make that change, then restart your command prompt using your hotkey.

Now that you've set up proper paths, you should be able to cd to the appropriate directory where you extracted the doxygen source, run vcvars32 to properly set up your C++ compiler search paths, and now typing make msvc should properly make doxygen. If this does not work, please contact me to tell me what happened instead and help me determine whether this is a shortcoming of my enhancement of the directions on the doxygen website, or something else that I did not encounter when setting up my system.

My reason for all this effort was I wanted to make changes to the source code and have a custom binary on Windows. If you want to apply my changes, check out this. I made changes to dot.cpp that give me a plain text-based description of the callgraphs ordinarily generated in png format, which isn't very friendly for trying to extract the structure of a call graph. My changes allow doxygen to output a text description of the callgraphs which I can then parse easily using string operations. For more about the plain format, refer to the Graphviz documentation.