How to Build ISC BIND DNS in Windows

Building Berkeley Internet Name Daemon (BIND) would be required if you need a debug build kit that is compatible with your environment so that you can run BIND with a debugger. Building OpenSSL is required so as to build BIND. However, an active installation of Perl is needed to build OpenSSL. This makes the process of building BIND a tiresome task without a strict guide. This article enumerates the steps required to do this in a systematic defined way.


  1. Image titled Build ISC BIND DNS in Windows Step 1
    Install a Perl package. Many Perl packages are available for free, such as ActivePerl [1]
  2. Image titled Build ISC BIND DNS in Windows Step 2
    Download and install OpenSSL:
    1. Download[2] OpenSSL code and extract it to a folder on your hard drive. c:\openssl-0.9.8h will be assumed throughout this article.
    2. Open a Visual Studio command prompt and change the current directory to the one you extracted OpenSSL on (issue the command: cd c:\openssl-0.9.8h)
    3. Issue the command:
      perl Configure VC-WIN32 --prefix=c:/openssl
      Where c:/openssl is the directory where you want OpenSSL to be installed to.
    4. Issue the command:
      to build the make-files
      • Make sure no errors occurred while executing. This is a batch file that invokes many other commands so take extra care to the messages that show up.
      • If an error ensues stating that an environment variable is not defined (something like "%OSVERSION% is not defined"), you might need to add the following line to the file c:\openssl-0.9.8h\util\pl\ near the top of the file before the first if statement:
        $FLAVOR = 'WINXP';
        This is most likely to happen if building in a Windows XP SP2 or higher machine.
      • If you have to do the previous step, you might want to use Wordpad instead of notepad to open Perl files if you don't have notepad++ or some other editor that can interpret UNIX-style end-of-lines.
    5. Issue the following command and make sure you do that in a Visual Studio command prompt:
      nmake -f ms\ntdll.mak.
      • If everything goes right, a new directory named out32dll will be created in the OpenSSL source directory with some executable and dll files in it.
  3. Image titled Build ISC BIND DNS in Windows Step 3
    Download and prepare the BIND source:
    1. Download the BIND source from ISC. Make sure you download the source package not one of the binary ones.
    2. Extract the files to your hard drive. c:\bind-9.5.0-P2 will be assumed throughout this article.
    3. Open the folder (c:\bind-9.5.0-P2) in Windows Explorer and find the two files libdns.dsp and libdns.mak.
    4. Open the files above in notepad (right click and choose "open with". Do not open the files with Visual Studio).
    5. Replace all occurrences of openssl-0.9.8d with your version (in this case, open ssl-0.9.8h)
      • In future versions, BIND may change to support a newer version on OpenSSL. For best results, use the search feature of your text editor to look for all occurrences of "openssl-" and replace manually.
  4. Image titled Build ISC BIND DNS in Windows Step 4
    Build BIND:
    1. Open a Visual Studio command prompt and change the directory to the one containing BIND source.
      cd c:\bind-9.5.0-P2
    2. Change current directory to win32utils
      cd win32utils
    3. Issue the command:
      Make sure no errors occur.
    4. Open the BindBuild.dsw file in Visual Studio.
      • The file can be found in the win32utils directory.
      • You might be prompted to convert the project into current Visual Studio format if you have a VS installation higher than VS 7. In such case, choose "yes to all".
    5. Configure the output platform:
      • In VS 7: Go to Project > Properties > C/C++ > General . Select "Platform" from the Drop Down Box as : Win32.
      • In later versions, this will mostly be set, but you can make sure by right clicking the solution icon and choosing properties. There you'll see if the platform is Win32 or not. If not, change it.
    6. Add additional include directories:
      • VS 7: Go to Project > Properties > C/C++ > General, in the "Additional Include Directories" give the path of OpenSSL folder that has all the header files under inc32 . In the example given so far, that would be c:\openssl-0.9.8h\inc32 and click apply.
      • Higher versions of VS: Right click a project, choose "Properties" then in "Configuration Properties" > C/C++, add the folder to the additional include directories.
    7. Build BIND:
      • In VS 7: Go to Build > Batch Build > Select All > Build/Rebuild
      • In VS 8 and higher: Go to Build > Build Solution
    8. Under the build folder you'll find two directories, "Debug" and "Release" where you'll find BINDinstall.exe which you can use to install BIND.


  • A good Source of information for building BIND in case of any trouble would be : 'win32-build.txt' file under 'win32utils'
  • It's recommended to do the above steps using VS 7

Sources and Citations

Article Info

Categories: Programming