Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Building on Windows

daanmichiels edited this page Nov 8, 2014 · 7 revisions


The information below is outdated. The project is now built on Windows using the Microsoft Visual C++ compiler instead of Mingw-w64. Please wait for this page to be updated.



The project can be built on Windows with g++ (part of the GNU Compiler Collection) using MinGW-w64 and MSYS.

I think this is how I got the project to build on my system (running Windows 8.1). I'm not an expert in these things, so it may not work for your system.

Setting up MinGW-w64 and MSYS

When setting up my environment, I referred to MinGW-w64 for the Uninitiated. I downloaded MinGW-w64 from a SourceForge download page under "Looking for the latest release?". During setup, I selected the following options:

  • version: 4.9.1
  • architecture: x86_64 (I'm on a 64-bit system.)
  • threads: win32
  • exception: sjlj
  • build revision: 0

Install to C:/mingw64.

I downloaded MSYS from another SourceForge download page, filename MSYS-20111123.zip. I unzipped this to C:\msys. Then I edited C:\msys\etc\fstab to be:

c:/mingw64 /mingw
c:/Users   /home

Running C:\msys\msys.bat opens a shell, and running g++ --version confirms that I have version 4.9.1. Running make --version tells me I have GNU Make 3.81.

You'll also have to make sure that the command python successfully calls some version of python.

Getting the third-party libraries

The project requires glew, glfw and glm. The file structure for third-party libraries is explained under Third-party libraries.

For glm, just make sure you check out the files using git (or download them), since this library is a submodule of the project.

For glew, download the source as a zip from http://glew.sourceforge.net/index.html (the precompiled binaries for Windows will not work, because those are for a different compiler). Extract to a folder somewhere. In MSYS, navigate to the folder and run make. You'll have to wait a bit while the library is being built. Once it's done, copy the contents of the lib folder (that have just been generated) to the folder /thirdparty/glew/lib.

For glfw, get the precompiled binaries for Windows (32 or 64 bit, depending on your system) from http://www.glfw.org/download.html. Copy the contents of lib-mingw to /thirdparty/glfw/lib.

Building the project

In the MSYS console (started with msys.bat), navigate to the project folder using ls. Running make should do the trick. The object files will be put under /obj, and you'll find the executable at /bin/hr.exe. Running make clean will delete the object files and binary.