In this tutorial I will show yow 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.19.4 and Visual Studio Community 2019.
Visual Studio Community 2019 could be downloaded from https://www.visualstudio.com/downloads/. During a fresh installation enable "Desktop development with C++" workload and check box "Windows 10 SDK" to enable usage of the Graphical Device Interface (GDI) useful to display images in a window thanks to vpDisplayGDI class. After a fresh installation, start Visual Studio and create an empty C++ project to install the common tools for Visual C++ 2019.
If you already have Visual Studio Community 2019, you can check if "Desktop Development with C++" workload is activated and if "Windows 10 SDK" is enabled following instructions given here that we resume: 1.1 Find the Visual Studio Installer on your computer. Select Start, and then scroll to the letter V, where it's listed as Visual Studio Installer Click or tap to start the installer, and then choose "Modify" 1.2 From the Workloads screen, check if "Desktop Development with C++" workload is activated and if "Windows 10 SDK" is enabled like in the following image
1.3 Choose Modify again. 1.4 After the new workloads and components are installed, choose Launch.
CMake could be download from http://www.cmake.org. Download the latest release for Windows win64-x64 platform (at the time this tutorial was written it was the file cmake-3.19.4-win64-x64.msi). To install just double click on the msi file.
Install Git for Windows from https://git-for-windows.github.io/. This installation allows then to use git in a cmd Command Prompt.
In this link I show yow how to install PCL from source on Windows 10 with Visual C++. https://github.com/Qannaf/Building-PCL-with-Visual-Studio-from-source-on-Windows/blob/main/PCL1.10.0.md
In this link I show yow how to install OpenCV on Windows 10 with Visual C++/Python. https://github.com/Qannaf/Building-OpenCV-with-Visual-Studio-from-source-on-Windows/blob/main/OpenCV.md
- Clone ViSP3.3 from Git. https://github.com/lagadic/visp.git
Launch CMake (cmake-gui) and complete the source code and binaries location as in the next image
-
Specify the input destination of the source code and the output destination of the solution file.
-
Select then your compiler "Visual Studio 16 2019" and click on "Finish" button
This will start CMake configuration -
[Configure] This will start CMake configuration. As shown in the next image, Eigen3
-
[Generate]Press to output the solution file
1.Start Visual Studio with administrator privileges and PCL solution file(C:\ViSP3.30\build\VISP.sln) Open
(INSTALL fails unless Visual Studio is started with administrator privileges)
-
Build ViSP (ALL_BUILD)
-
Set the solution configuration (Release).
-
Select the ALL_BUILD project from Solution Explorer.
-
Press Build> Build Solution to build the ViSP.
-
Install ViSP (INSTALL)
- Select the INSTALL project from Solution Explorer.
- Press Build> Project Only> Build INSTALL Only to install ViSP. The necessary files are copied to the output destination specified by ** CMAKE_INSTALL_PREFIX **.
-
Create the environment variable ** VISP_DIR ** and set the PCL path (C:\ViSP3.30\install).
-
Add the path of PCL and 3rd Party to the environment variable ** Path **.
- %VISP_WS%\install\x64\vc16\bin