If the header file Windows.h is referenced in the OPENCV-3.0 project, the following compilation error will occur
1>c:\program Files\Microsoft Sdks\windows\v6.0a\include\winnt.h (6405): Error C2872: ' Access_mask ': ambiguous Symbol 1> could be ' C:\Program Files\Microsoft Sdks\windows\v6.0a\include\winnt.h (5589): DWORD access_mask ' 1> or ' u:\opencv\opencv-3.0-beta\build\install\include\opencv2/core/mat.hpp: Access_mask ' |
I found a solution on the Internet.
Https://github.com/LeszekSwirski/opencv/commit/bac3bea9f7cc253934ee9004150206dd1cb22fcb
But do not know is based on which baseline, so still decided to do their own modification.
Search in the Opencv-3.0-beta sources directory, only Access_mask is found in mat.hpp and matrix.cpp, and there are not many occurrences. This is good to do, directly to change the access_mask into a __fixme_access_mask. Recompile, fix it.
However, this modification is still a hidden problem, if Access_mask is referenced in the project, it will get an incorrect value from the Windows header file, which may lead to a very hidden bug.
Resolving access_mask definition conflicts in Opencv-3.0-beta