[转]Porting old projects to WTL8

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

:)

posted on 2010-01-09 13:54  Sky Lyu  阅读(240)  评论(0)    收藏  举报

导航