VC6 + STLPort 4.61无法编译通过boost库,求救!
vc6 sp5 + stlport 4.6.1
执行如下命令编译boost,出现一堆关于vsnprintf的错误。
C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat
set STLPORT_PATH=d:\
set STLPORT_4.6.1_PATH=d:\STLport-4.6.1
set STLPORT_VERSION=4.6.1
set STLPORT_VERSIONS=4.6.1
set stlport-iostream=on
set stlport-version=4.6.1
set stlport-cstd-namespace=std
set TOOLS=msvc-stlport
bjam install
错误信息为:
d:\STLport-4.6.1\stlport\cstdio(117) : error C2039: 'vsnprintf' : is not a member of '`global namespace''
d:\STLport-4.6.1\stlport\cstdio(117) : error C2873: 'vsnprintf' : symbol cannotbe used in a using-declaration
D:\boost_1_31_0\boost/date_time/year_month_day.hpp(41) : fatal error C1506: unrecoverable block scoping error
我看了一下stlport的那个d:\STLport-4.6.1\stlport\cstdio文件,里头是这样定义vsnprintf函数的:
# if defined (_STLP_MSVC) || defined (__ICL)
namespace _STLP_VENDOR_CSTD {
inline
int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
{
return ::_vsnprintf(s1, n, s2, v);
}
}
# endif
请问怎么解决这个vsnprintf导致的编译问题啊?谢谢