引用头文件顺序问题 error C2039

建的WTL工程,用到CString和DataExchange

因为WTL和ATL都有对CString的定义

当先包含 atlstr.h 再包含 atlddx.h 时会出现以下错误

error C2039: 'CString' : is not a member of 'WTL' c:\program files\microsoft visual studio 10.0\vc\wtl\atlddx.h

解决办法是先包含 atlddx.h 再包含 atlstr.h ,详细原因待分析。

posted @ 2013-08-29 16:02  琼'  阅读(501)  评论(0编辑  收藏  举报