VC6 + STLPort 4.61无法编译通过boost库,求救!

Netguy 2004-03-11 01:48:09
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导致的编译问题啊?谢谢
...全文
88 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复

24,854

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧