Visual Servoing Platform  version 3.0.0
Tutorial: Installation from source on Windows 10 with Visual C++ 2015

In this tutorial you will learn how to install ViSP from source on Windows 10 with Visual C++. These steps have been tested on Windows 10 (64 bit), with CMake 3.3.2 and Visual Studio Community 2015.

Concerning ViSP installation, we provide also other Tutorials.

Install prerequisities

  • Visual C++. Visual Studio Community 2015 that includes Visual C++ could be downloaded from After the installation, start Visual Studio and create an empty C++ project to install the common tools for Visual C++ 2015.
  • CMake that could be download at :
    We notice that CMake 3.4.1 was not able to detect Visual C++ 2015. This issue is kwown by CMake developers and registered as a bug That is why we suggest to install CMake 3.3.2 to work with Visual C++ 2015.
    To install CMake 3.3.2, download the previous release binary distribution installer for Windows. You will find it under "Windows (Win32 Installer)". Install CMake just by double clicking on the binary cmake-3.3.2-win32-x86.exe you downloaded.
  • Windows Software Developement Kit (SDK) for Windows 10. This SDK could be downloaded from This SDK is requested by CMake and allows also to get the Graphical Device Interface (GDI) capabilities. The GDI is used in ViSP to display images in a window thanks to vpDisplayGDI class.

Install 3rd parties

ViSP is interfaced with several 3rd party libraries. The complete list is provided here.

Recommended 3rd parties

We recommend to install OpenCV 3rd party. Other 3rd parties should be considered only by expert developers.

OpenCV 3rd party

  • From download the latest OpenCV for Windows version. In our case we install opencv-3.1.0.exe pre-build SDK in C:\OpenCV. The installer opencv-3.1.0.exe extracted all the material in C:\OpenCV\opencv.
    OpenCV 3.1.0 windows installer contains pre-build libraries compatible with Visual C++ 2015 (in C:\OpenCV\opencv\build\x64\vc14) and also libraries compatible with Visual C++ 2013 (in C:\OpenCV\opencv\build\x64\vc12). With any other compiler version you need to build yourself OpenCV from source.
    There is an OpenCV tutorial: Installation Using the Pre-build Libraries that may help if you encounter some difficulties.
  • Now in order that ViSP detects OpenCV you have to set OpenCV_DIR environment variable. Start up a command window (in your "Start" menu click on "Run" and type in cmd.exe) and enter:
    setx OpenCV_DIR C:\OpenCV\opencv\build
    where C:\OpenCV\opencv\build is where you have the build directory (extracted or built). Inside this folder you should have a file named OpenCVConfig.cmake.
  • You have also to add the location of OpenCV libraries in the PATH environment variable following the indications mentioned in Setting up PATH variable.

Install ViSP from source code

Getting ViSP source code

There are different ways to get ViSP source code.

  • You can download the latest release as a zip or a tarball. Once visp-x.y.z.tar.gz or is downloaded, uncompress the file.
  • You can also download a daily snapshot. Once visp-snapshot-yyyy-mm-dd.tar.gz is downloaded, uncompress the file.
  • Or you get the cutting-edge ViSP from GitHub repository using the git command line (see How to install Git):
    C:\ViSP> git clone

We suppose now that ViSP source is in a directory denoted <source_dir>, for example C:\ViSP\visp

Configuring ViSP from source

The goal of the configuration step is now to use CMake to produce a Visual Studio C++ solution that will be located in <binary_dir>, for example C:/ViSP/visp-build.

  • Launch CMake (cmake-gui) and complete the <source_dir> and <binary_dir> locations as in the next image.
  • Click then on "Configure" button.
  • Click on "Yes" to create the C:/ViSP/visp-build folder.
  • Select then your compiler, for example here Visual Studio Express 2013 Win64, and click on "Finish" button.
  • This will start CMake configuration. As shown in the next image, GDI (Graphical Device Interface), OpenCV and OpenMP 3rd parties are automatically detected.
  • As given in the previous image, note also that the installation folder is set to C:/ViSP/visp-build/install.
    If you want to change the installation forder to C:/Program Files (x86)/ViSP, make sure that you have administrator privileges to write in that folder.
  • Click then on "Configure" button. All the red lines should disappear.
    The default configuration lead to the creation of a shared library (with .dll extension). This is the default configuration that is recommended. If you want to create rather a static library (with .lib extension) you have to uncheck the BUILD_SHARED_LIBS option to disable DLL creation.
  • To finish the configuration, click on "Generate" button.
  • Once the generation is done, in C:/ViSP/visp-build folder you have the Visual Studio VISP.sln generated solution file.

Building ViSP from source

  • To build ViSP just double click on C:/ViSP/visp-build/VISP.sln solution file. This action will open ViSP project in Visual Studio C++. As shown in the next image, by default, Visual Studio position the solution configuration to Debug.
  • Enter menu "BUILD/Build Solution" to build ViSP.
  • At the end of the build process you should have the following indicating that all the build succeeded.
  • Now to install ViSP, build "INSTALL" project. To this end, apply a left click on "INSTALL" to select the project, then a right click to enter in the "Build" menu.
  • At the end of the installation, you should have the following.
  • As shown in the previous image, all the headers but also the generated library are copied in C:/ViSP/visp-build/install folder.
  • This ends ViSP installation with Debug configuration.
  • We recommend now to do the same with Release settings. As shown in the next image, select the Release configuration.
  • Now, as previously, build and install ViSP again.
  • At the end, in C:/ViSP/visp-build/install/x64/vc14/bin folder you have two versions of ViSP DLL libraries corresponding to ViSP modules; the one suffixed by "d" with debug information, the other one optimized with release compiler options.

Setting up PATH variable

If you built static libraries then you are done. Otherwise, if you follow this tutorial step by step you need to add the bin folders path to the systems path. This is because you will use ViSP and OpenCV libraries in form of "Dynamic-link libraries" (also known as DLL). Inside these are stored all the algorithms and information the libraries contains. The operating system will load them only on demand, during runtime. However, to do this he needs to know where they are. The systems PATH variable contains a list of folders where DLLs can be found. Add ViSP and OpenCV libraries path to this and the OS will know where to look if he ever needs the libraries. Otherwise, you will need to copy the used DLLs right beside the applications executable file (exe) for the OS to find it.

To modify the PATH var and add the path to ViSP library, open a cmd terminal and run:

C:\> echo %PATH%
C:\> setx PATH "%PATH%;C:\ViSP\visp-build\install\x64\vc14\bin"

Then to add the path to OpenCV 3rd party libraries location, close and re-open a cmd-terminal and run:

C:\> echo %PATH%
C:\> setx PATH "%PATH%;C:\OpenCV\opencv\build\x64\vc14\bin"

Then close and re-open a cmd terminal to check if the PATH var was well positioned.

C:\> echo %PATH%

Install ViSP dataset

Some ViSP examples and tests require data (images, video, models) that are not part of ViSP source code but available in a separate archive named This archive could be downloaded from page. We provide here after the way to install these data if you want to run ViSP examples.

Download from and uncompress it for example in C:/ViSP.


ViSP examples and tests are able to detect automatically the location of the requested data if you position an environment variable called VISP_INPUT_IMAGE_PATH. In our case, this variable should be set to C:\ViSP.

For historical reasons VISP_INPUT_IMAGE_PATH should not contain the folder ViSP-images, but the parent folder.

From now, you can try to run ViSP examples and tests. For example, if you want to run <binary dir>/example/device/display/Debug/displayGDI.exe, open a command window, enter in the right folder, and run:


Next tutorial

You are now ready to see the next Tutorial: How to create and build a CMake project that uses ViSP on Unix or Windows that will show you how to use ViSP as a 3rd party to build your own project.