[转]Porting old projects to WTL8

那年仲夏 提交于 2019-11-27 06:46:13

from: http://wmdevelopers.blogspot.com/2008_05_01_archive.html

Hi,
after upgraded to WTL 8.0 if you try to compile old project you'll get errors like these:

    error C2668: 'lstrlenA' : ambiguous call to overloaded function ...\WTL80\include\atlapp.h 697
    error C2514: 'size_t' : class has no constructors ...\WTL80\include\atlapp.h 73e
    error C3861: 'lstrcpynA': identifier not found ...\WTL80\include\atlapp.h 74

 

The way to fix it is simple, just add:

    #if _ATL_VER == 0x900
    #define _SECURE_ATL 1
    #endif


just before the include of atlapp.h

:)

转载于:https://www.cnblogs.com/skylyu/archive/2010/01/09/1642895.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!