-
Notifications
You must be signed in to change notification settings - Fork 7
Compile Windows
To get icg running on Windows (7/8/10) you first need to do the following:
- Install CMake: needed to build your code.
- 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.
- Install Qt Creator 64bits: IDE for C++ and GLSL.
- (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.
To build with Qt Creator, do the following:
- Open Qt Creator.
- Select Open Project.
- Navigate to where the source code is and select the CMakeLists.txt file that sits inside.
- Run CMake.
- You can now use Qt Creator to compile your code.
Open up the CMake gui. This can be found by going to start menu and typing "cmake" (without quotes). Now do the following:
- 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).
- 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.
- 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.
- If everything goes well, then you will see no red messages with ERROR next to them. If this is the case, then click generate.
- Go to the build directory and open the file called icg.sln
- You can now use Visual Studio to compile and test your code.
Please post your problem on the "Issues" pane and we will try to solve it as quickly as possible!
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]
©Department of Computer Science, University of Victoria, 2015.