在工程中添加了atl支持,编译时出现以下错误
e:\project\OPCenter\Connection.h(25) : error C2872: “CEvent” : 不明确的符号
        可能是“c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxmt.h(125) : CEvent”
        或      “c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlsync.h(51) : ATL::CEvent”

解决方案 »

  1.   

    There are two CEvent. Which one you do want to use?Remove using namespace ATL; Add ATL:: before all ATL stuff you're using. For example, if you want to use ATL's CEvent, write
                    ATL::CEvent
      

  2.   

    好像是编译器不知道用那个event了吧?像大侠们学习。
      

  3.   

    如果不使用ATL::CEvent呢?是不是只要把using namespace ATL;去掉,但是这样会不会导致不能使用ATL
      

  4.   

    Just add ATL:: to everything from ATL namespace.