Hi, I am new to OpenCV and trying to install it from source files using Cmake(gui) and Visual Studio 2017.
System Properties
Windows 10 Enterprise Version 1709 OS Build 16299.2166
GPU = Nvidia Quadro P600 (Driver version 452.77)
CMake 3.19.2
Cuda Toolkit Version 10.1
Microsoft Visual Studio Professional 2017 Version 15.9.31
OpenCV 4.5.0 (extra modules downloaded from Github are the latest version)
Visual Toolkit version 7.1
Cmake
After altering a few configurations in Cmake (Generator = Visual Studio 15 2017, Platform = x64)
- WITH_CUDA = TRUE
- OPOENCV_EXTRA_MODULES_PATH = …/opencv_contrib-master/modules
- BUILD_EXAMPLES = TRUE)
I configure again before generating (log is at Cmake Configuration - Pastebin.com)
Compiling in Visual Studio
I proceed to run OpenCV.sln in Visual Studio and after building either BUILD_ALL or INSTALL in the x64 Debug configuration, I get 13176 Warnings and 391 Errors.
For the sake of brevity, I will only put unique errors on this post but the full error lists (warnings here: OpenCV Visual Studio Warnings - Pastebin.com and errors here: pastebin->GTa6mTgp (new users can only post 2 links))
Warnings
- Unreachable code
- The -std=c++ 11 flag is not supported with the configured host compiler. Flag will be removed
- potentially uninitialized local variable ‘rmsd’ used
- nonstandard extension used: nameless struct/union
- field of class type without a DLL interfaced used with a DLL interface
- base class dllexport/dllimport specification differs from that of the derived class
- assignment with conditional expression
- ‘|’ unsafe mix of type ‘int’ and type ‘bool’ in operation
- ___ unreferenced local function has been removed
- conversion from ___ to ___ possible loss of data
- ‘detail’ namespace uses itself
- signed/unsigned mismatch
Errors
- syntax error: missing ‘;’ before ‘vocabulary’
- missing type specifier - ‘int’ assumed. Note: C++ does not support default-int
- cannot open include file: ‘opencv2/video/detail/tracking.private.hpp’: No such file or directory
- cannot open file ‘…\lib\Debug\opencv_tracking450d.lib’
- cannot open file ‘…\lib\Debug\opencv_stereo450d.lib’
- binary ‘->’: no operator found which takes left-hand operand of type ‘cv::Ptr’ (or there is no acceptable conversion)
- ‘vocabulary’: undeclared identifier
- ‘TrackerKCF/GOTURN/CSRT’ is not a class or namespace name
- ‘Tracker’: base class undefined
- ‘string’ undeclared identifier
- ‘Params’: ambiguous symbol
- ‘cv::tracking::::’ method with override specifier ‘override’ did not override any base class methods
- ‘cv::Ptr’ class has no constructors
- ‘cv::Ptr’: ‘Tracker’ is not a valid template type argument for parameter ‘T’
- ‘create’: identifier not found
Any help would be appreciated thanks.