VC6中使用STLPort 5.1


编译方法用以下批处理

 这里给一个批处理编译的

D:
cd "D:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin"
call VCVARS32.BAT
cd D:\STLport5\build\lib
call configure -c msvc6
call nmake /fmsvc.mak install

pause

********************************************
如果和PlatformSDK 一起使用的话
要记的在STLport目录中 /stlport/stl/config/user_config.h 文件中
把这一句打开

     # define _STLP_NEW_PLATFORM_SDK 1


否则在编译时会有如下错误
second C linkage of overloaded function 'InterlockedIncrement' not allowed

********************************************

如果想静态链接 STLPort 请在VC6的 C/C++ / General / Preprocessor definitions
中添加宏 _STLP_USE_STATIC_LIB

********************************************

对於使用IOSTREAM的, 如果有问题
在STLport目录中 /stlport/stl_user_config.h 文件中
把这一句打开吧

    # define _STLP_NO_IOSTREAMS 1

********************************************

- When you erase an element from a hash_map only iterators to the erased element are invalidated
  so you can write something like:

while (it != myHashMap.end()) {
if (condition)
 myHashMap.erase(it++); //这里为何这样不出错 而把it++放外面就不行呢
    //在外面是对删除后的无效指针加, 而里面是对有效指针加
else
 ++it;
}

  To finish STLport has a special debug mode to check such bad construction. Check the
  stl_user_config.h file in the stlport folder for that, the macro is _STLP_DEBUG.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值