CMutex ambiguous symbol

error C2872: 'CMutex' : ambiguous symbol
        could be 'c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxmt.h(105) : CMutex'
        or 'c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlsync.h(77) : ATL::CMutex'
Obviously both files have CMutex class defined and it is not the same. If ATL versiun would be the one this module needs, I could probably define the namespace with ATL::CMutex. But how can I tell the compiler that it should take the first version? It has no namespace specified!?

You could use

::CMutex myMutex;

posted @ 2012-02-28 13:33  greencolor  阅读(446)  评论(0编辑  收藏  举报