Resolving access_mask definition conflicts in Opencv-3.0-beta

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.