1 | initial version |
I just built OpenCV 3.0 from source on Visual Studio Community 2015 both debug and release x64 on Windows 10:
The key was to check out the version after pull request 5212 was merged: 421e1b237c4c0024f46a9ab06ca23497d8cb2204 This fixes issue 5007: Error in Building OpenCV for Microsoft VS 2015.
The steps were (using MinGW bash shell):
git clone https://github.com/Itseez/opencv.git
cd opencv
git checkout 421e1b237c4c0024f46a9ab06ca23497d8cb2204 -b with-vc2015-fix
cmake-gui & # Then set destination dir, configure, configure, generate
Then, open OpenCV.sln
in Visual Studio, Right-click on ALL_BUILD, select build. Then, switch to Release mode and repeat the menu selection.
2 | No.2 Revision |
I just built OpenCV 3.0 from source on Visual Studio Community 2015 both debug and release x64 on Windows 10:
The key was to check out the version after pull request 5212 was merged: 421e1b237c4c0024f46a9ab06ca23497d8cb2204 This fixes issue 5007: Error in Building OpenCV for Microsoft VS 2015.
The steps were (using MinGW bash shell):
git clone https://github.com/Itseez/opencv.git
cd opencv
git checkout 421e1b237c4c0024f46a9ab06ca23497d8cb2204 -b with-vc2015-fix
cmake-gui & # Then set destination dir, configure, configure, generate
Then, open OpenCV.sln
in Visual Studio, Studio. It will be building the Debug target. Right-click on ALL_BUILD, select build. Wait until it finishes, Go to the CMakeTargets project, Right click on INSTALL and select build. Then, switch to Release mode and repeat the menu selection.selections you did for the Debug target.
A commenter asked for the response to cv::getBuildInformation()
it was too big to fit in a comment, so I included it in the answer.
General configuration for OpenCV 3.0.0-dev =====================================
Version control: 3.0.0-312-g421e1b2
Platform:
Host: Windows 10.0.10240 AMD64
CMake: 3.4.0-rc2
CMake generator: Visual Studio 14 2015 Win64
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900
C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.23026.0)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /INCREMENTAL:NO /debug
Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
Precompiled headers: YES
Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32
3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf ippicv
OpenCV modules:
To be built: hal core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d stitching videostab
Disabled: world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz
Windows RT support: NO
GUI:
QT: NO
Win32 UI: YES
OpenGL support: NO
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.8)
JPEG: build (ver 90)
WEBP: build (ver 0.3.1)
PNG: build (ver 1.5.12)
TIFF: build (ver 42 - 4.0.2)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
GDAL: NO
Video I/O:
Video for Windows: YES
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: YES (prebuilt binaries)
codec: YES (ver 56.41.100)
format: YES (ver 56.36.101)
util: YES (ver 54.27.100)
swscale: YES (ver 3.1.101)
resample: NO
gentoo-style: YES
OpenNI: NO
OpenNI PrimeSensor Modules: NO
OpenNI2: NO
PvAPI: NO
GigEVisionSDK: NO
DirectShow: YES
Media Foundation: NO
XIMEA: NO
Intel PerC: NO
Parallel framework: Concurrency
Other third-party libraries:
Use IPP: 8.2.1 [8.2.1]
at: C:/Users/MyUsername/Prj/opencv/3rdparty/ippicv/unpack/ippicv_win
Use IPP Async: NO
Use Eigen: NO
Use Cuda: NO
Use OpenCL: YES
OpenCL:
Version: dynamic
Include path: C:/Users/MyUsername/Prj/opencv/3rdparty/include/opencl/1.2
Use AMDFFT: NO
Use AMDBLAS: NO
Python 2:
Interpreter: C:/Python27/python.exe (ver 2.7.10)
Python 3:
Interpreter: NO
Python (for build): C:/Python27/python.exe
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab:
mex: NO
Tests and samples:
Tests: YES
Performance tests: YES
C/C++ Examples: NO
Install path: C:/Progs/OpenCV/build/vc2015/install
cvconfig.h is in: C:/Progs/OpenCV/build/vc2015
-----------------------------------------------------------------
3 | No.3 Revision |
I just built OpenCV 3.0 from source on Visual Studio Community 2015 both debug and release x64 on Windows 10:
The key was to check out the version after pull request 5212 was merged: 421e1b237c4c0024f46a9ab06ca23497d8cb2204 This fixes issue 5007: Error in Building OpenCV for Microsoft VS 2015.
The steps were (using MinGW bash shell):
git clone https://github.com/Itseez/opencv.git
cd opencv
git checkout 421e1b237c4c0024f46a9ab06ca23497d8cb2204 -b with-vc2015-fix
cmake-gui & # Then set destination dir, configure, configure, generate
Then, open OpenCV.sln
in Visual Studio. It will be building the Debug target. Right-click on ALL_BUILD, select build. Wait until it finishes, Go to the CMakeTargets project, Right click on INSTALL and select build. Then, switch to Release mode and repeat the menu selections you did for the Debug target.
A commenter asked for the response to cv::getBuildInformation()
it was too big to fit in a comment, so I included it in the answer.
General configuration for OpenCV 3.0.0-dev =====================================
Version control: 3.0.0-312-g421e1b2
Platform:
Host: Windows 10.0.10240 AMD64
CMake: 3.4.0-rc2
CMake generator: Visual Studio 14 2015 Win64
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900
C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.23026.0)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP8 /MD /O2 /Ob2 /D NDEBUG /Zi
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /INCREMENTAL:NO /debug
Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
Precompiled headers: YES
Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32
3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf ippicv
OpenCV modules:
To be built: hal core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d stitching videostab
Disabled: world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz
Windows RT support: NO
GUI:
QT: NO
Win32 UI: YES
OpenGL support: NO
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.8)
JPEG: build (ver 90)
WEBP: build (ver 0.3.1)
PNG: build (ver 1.5.12)
TIFF: build (ver 42 - 4.0.2)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
GDAL: NO
Video I/O:
Video for Windows: YES
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: YES (prebuilt binaries)
codec: YES (ver 56.41.100)
format: YES (ver 56.36.101)
util: YES (ver 54.27.100)
swscale: YES (ver 3.1.101)
resample: NO
gentoo-style: YES
OpenNI: NO
OpenNI PrimeSensor Modules: NO
OpenNI2: NO
PvAPI: NO
GigEVisionSDK: NO
DirectShow: YES
Media Foundation: NO
XIMEA: NO
Intel PerC: NO
Parallel framework: Concurrency
Other third-party libraries:
Use IPP: 8.2.1 [8.2.1]
at: C:/Users/MyUsername/Prj/opencv/3rdparty/ippicv/unpack/ippicv_win
Use IPP Async: NO
Use Eigen: NO
Use Cuda: NO
Use OpenCL: YES
OpenCL:
Version: dynamic
Include path: C:/Users/MyUsername/Prj/opencv/3rdparty/include/opencl/1.2
Use AMDFFT: NO
Use AMDBLAS: NO
Python 2:
Interpreter: C:/Python27/python.exe (ver 2.7.10)
Python 3:
Interpreter: NO
Python (for build): C:/Python27/python.exe
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab:
mex: NO
Tests and samples:
Tests: YES
Performance tests: YES
C/C++ Examples: NO
Install path: C:/Progs/OpenCV/build/vc2015/install
cvconfig.h is in: C:/Progs/OpenCV/build/vc2015
-----------------------------------------------------------------