---
# System prepended metadata

title: Compile Guide for Windows

---

# Compile Guide for Windows

## Pre-install libraries

### OpenCV
(Based on https://docs.opencv.org/master/d3/d52/tutorial_windows_install.html)

Download the precompiled binary from https://sourceforge.net/projects/opencvlibrary/files/opencv-win/
and extract to a location like C:/Users/username/Documents/
Then adding the following variable as a new environment variable
> OpenCV_DIR The:/Extract/LocationOf/opencv/build/x64/vc15/lib

Note: the Upper case or Lower case makes a difference
and the location will be the lib subfolder

### OpenCL

Install Intel OpenCL SDK from here: https://software.intel.com/en-us/opencl-sdk

It should automatically add a new entry to the environment variable


## Compile Tools

### Cmake
Install Cmake from here https://cmake.org/download/

### Visual Studio Build Tools
This is part of the Visual Studio Package https://visualstudio.microsoft.com/downloads/
You can install Visual Studio Build Tools only.


### Compile

1. Open "x64 Native Tools Command Prompt for VS 2017"
2. Go to the repo folder
3. cmake -DCMAKE_GENERATOR_PLATFORM=x64 . 
4. msbuild ./ALL_BUILD.vcxproj

