I have mainly used Linux as the working environment for the development of SWIG for DMD. In this case it is possible to have a set of tools to run all stages of the operation. I have installed Andy Friesens's version of SWIG and then modified two files within it to change the operation. This can be installed (with root permission) and can then be run to generate the wrapper files. The files are partly in C or C++ and partly in D. These must be compiled and linked.
See /Examples for detailed examples.