Is OpenCv 3.0 compatible for VS 2015
Need to configure the setting for OpenCv for VS2015 as it require C++ for making directory files and other setting for same 32 and 64 bit.
Need to configure the setting for OpenCv for VS2015 as it require C++ for making directory files and other setting for same 32 and 64 bit.
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.
Yes it is compatible. You should disable BUILD__opencv_adas if you build opencv with opencv_contrib. I have testet it with opencv 3.0-dev and VS 2015 with windows 10-64bits
General configuration for OpenCV 3.0.0-dev ===================================== Version control: 3.0.0-beta-1436-g945aa06-dirty
Platform: Host: Windows 6.2 AMD64 CMake: 3.3.0
Microsoft Visual Studio Enterprise 2015 Version 14.0.23107.0 D14REL Microsoft .NET Framework Version 4.6.00079
Version installée : Enterprise
After trying to build OpenCV 3.0 from source (fresh download from https://github.com/Itseez/opencv) by both VS 2015 Professional and Enterprise editions on a Win 7 64 bit machine, my conclusion is: currently, OpenCV 3.0 can not be built with VS 2015 due to an ICE: https://connect.microsoft.com/VisualS.... Hope VS 2015 update 1 can rectify this problem.
that's a problem for you not for me. I haven't got any error in debug or release
using getbuildinformation I have got this
General configuration for OpenCV 3.0.0-dev =====================================
Version control: 3.0.0-652-g259d9f7-dirty
Platform:
Host: Windows 6.2 AMD64
CMake: 3.3.0
CMake generator: Visual Studio 14 2015 Win64
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900
Where have you got an error?
Actually solving your problem is quite straightforward ... just disable the extra compiler option /O2
than it should not occur!
I tried to disable both /O2 and precompiled headers options but the errors still remained. I post my configurations here so some one can suggest a solution:
General configuration for OpenCV 3.0.0-dev =====================================
Version control: unknown
Platform:
Host: Windows 6.1 AMD64
CMake: 3.3.2
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 /G
@LBerger, could you check if your C++ compiler and flags are the same?
@tuannhtn Where is exactly your error ? First part
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 / wd4275 / wd4589 / MP12 / 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 / wd4275 / wd4589 / MP12 / D_DEBUG / MDd / Zi / Ob0 / Od / RTC1
second
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 / MP12 / 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 / MP12 / 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
Thanks @LBerger, the error was: INTERNAL COMPILER ERROR: fatal error C1001 (compiler file '...\vctools\compiler\utc\src\p2\main.c', line 246). I checked your configuration details and they are the same as mine. If possible, could you compress and send your full worled solution to me via email?
I put opencv and opencv_contrib into the folder F:\lib and build (from F:\lib\opencv\dyn2015) and encoutered following errors:
1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
2>------ Skipped Build: Project: RUN_TESTS, Configuration: Release x64 ------
2>Project not selected to build for this solution configuration
1> Checking Build System
1> The system cannot find the path specified.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3.
3>------ Build started: Project: opencv_hal, Configuration: Release x64 ------
4>------ Build started: Project: zlib, Configuration: Release x64 ------
5>------ Build started: Project: libjasper, Configuration: Release x64 ------
6>------ B
Asked: 2015-09-09 05:19:53 -0600
Seen: 3,724 times
Last updated: Nov 08 '15
Error in Building OpenCV for Microsoft VS 2015
LNK1104: cannot open file 'python34_d.lib'
OpenCV 3.0.0 + VS 2015 + Windows 10 Pro x64 - frame always empty
First Time User - What am I doing wrong?
Visual Studio 2015 Compatibility Issue using OpenCV3.0
Error LNK2019 from C++ VS2015 Help To FIX
Problem with configuration in VS2015 Opencv 3.1.0
how 2 configure opencv with VS2015 with qt
If it works please accept the answer ... It would be usefull to see an accepted answer on this subject :)