Ask Your Question
0

ACCESS MASK AMBIGUOUS SYMBOL

asked 2015-05-17 15:55:12 -0500

valazom gravatar image

I am trying to upgrade my opencv 2.4.11 to opencv 3.0rc1 and i get the following error:

Error   1   error C2872: 'ACCESS_MASK' : ambiguous symbol   C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h  9084

Error 2 error C2872: 'ACCESS_MASK' : ambiguous symbol C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h 9142 Error 3 error C2872: 'ACCESS_MASK' : ambiguous symbol C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h 9143 Error 4 error C2872: 'ACCESS_MASK' : ambiguous symbol C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h 9144

Please can someone help with this.

edit retag flag offensive close merge delete

Comments

I am getting the same error. Did you resolve this?

bear35645 gravatar imagebear35645 ( 2015-06-04 08:21:11 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2015-06-04 08:29:02 -0500

I found the answer some place else. The problem is caused by putting "using namespace cv;" in a header. If you need to define a class member that is part of the cv namespace in the header, use cv:: in front of the class name and move the using namespace to your cpp file.

edit flag offensive delete link more

Comments

1

You're right!. From the complete answerThis was a problem with having using namespace cv in a header, and then including windows headers.

using namespace ... in a header should be discouraged but a workaround for ACCESS_MASK issue could be to include Windows.h stuffs before of OpenCV.

pklab gravatar imagepklab ( 2015-12-19 10:07:27 -0500 )edit

Thank you. This helped.

gosk gravatar imagegosk ( 2017-06-27 07:31:57 -0500 )edit
-1

answered 2015-06-04 08:44:31 -0500

valentine gravatar image

A temporary fix is the change all instance in winn.h that has ACCESS_MASK to FIX_ME_ACCESS_MASK. This has worked fine for me so far. The only hassle is if any of your project references winn.h you gets bugs. other than that you are good to go.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-05-17 15:55:12 -0500

Seen: 10,227 times

Last updated: Jun 04 '15