Skip to content

Compile Windows

luckysama edited this page Oct 19, 2015 · 7 revisions

Preliminaries

To get icg running on Windows (7/8/10) you first need to do the following:

  1. Install CMake: needed to build your code.
  2. Install Visual Studio Community 2013: comes with the MSVC compiler (see notes at bottom). During the install, select only "Microsoft Foundation Classes for C++". This will save you some space in your drive, and we really don't need the rest of the stuff that comes bundled with it.
  3. Install Qt Creator 64bits: IDE for C++ and GLSL.
  4. (Optional, but a good idea either way) Install Git: version control.

Once you have everything installed, you can either download a zip of the code, or clone it. If you're cloning the repository, then fire up a terminal (Git comes included with one, defaults to C:\Users<username> in Windows 7/8/10) and enter the following command:

cd path/to/dir
git clone https://github.com/luckysama/icg.git

Once you have your hands on the source code, lets build it. At this stage, you need to decide how you're going to develop your code. If you're using Qt Creator, then skip to Building with Qt Creator, otherwise go to Building with Visual Studio.

Building with QtCreator (Recommended)

To build with Qt Creator, do the following:

  1. Open Qt Creator.
  2. Select Open Project.
  3. Navigate to where the source code is and select the CMakeLists.txt file that sits inside.
  4. Run CMake.
  5. You can now use Qt Creator to compile your code.

Building with Visual Studio

Open up the CMake gui. This can be found by going to start menu and typing "cmake" (without quotes). Now do the following:

  1. In the field labelled "Where is the source code:" enter the path where you extracted/cloned the source code. Suppose we cloned into C:\Users\foo\icg. Then we would write this address here (alternatively you can navigate with Windows explorer and copy the address from the search bar here).
  2. In the field labelled "Where to build the binaries:" enter the path to the build directory. Continuing with the previous example, then we can type C:\Users\foo\icg-build.
  3. Hit configure. A pop-up will ask you if you want to create the directory. Say yes, and then another pop-up will appear asking for the generator. Here, pick Visual Studio 12 2013 (for the time being, do not choose Visual Studio 12 2013 Win64. This is currently not supported, but will be in the future). Leave the default selection to "Use default native compilers" and hit finish.
  4. If everything goes well, then you will see no red messages with ERROR next to them. If this is the case, then click generate.
  5. Go to the build directory and open the file called icg.sln
  6. You can now use Visual Studio to compile and test your code.

If something goes wrong..

Please post your problem on the "Issues" pane and we will try to solve it as quickly as possible!

Some notes on Visual Studio 2013

The advantage of using Visual Studio is that you can use its debugger to quickly correct any errors you might make. If you're already familiar with C++ (particularly with C++11), then the following is of importance to you:

  • MSVC 12 (the version of the C++ compiler that comes with Visual Studio 2013) does not fully support C++11. For a list of all supported/unsupported features, look here. For the most part this is not a problem, but it is something to keep in mind.

  • Oct, 18, 2015: Please see this issue page if you have more errors with MSVC 12 (Visual Studio 2013) [https://github.com/luckysama/icg/issues/6]