VC6中使用STLPort4.6.2
2009-08-17 13:33
507 查看
编译就不说了, 网上这方面的文章很多
********************************************
如果和PlatformSDK 一起使用的话
要记的在STLport目录中 /stlport/stl_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.
********************************************
如果和PlatformSDK 一起使用的话
要记的在STLport目录中 /stlport/stl_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.
相关文章推荐
- VC6中使用STLPort4.6.2
- VC6(SP6)+STLPort4.6.2安装全攻略
- [原创]VC6(SP6)+STLPort4.6.2安装全攻略
- VC6.0下STLPort4.6.2安装手记
- VC6下使用STL注意:不要让内存分配失败导致您的旧版 STL 应用程序崩溃
- VS2008 STLport5.2.1爬虫使用实例
- VC6.0下STLPort4.6.2安装手记
- VC6使用STL时很多C4786警告
- 在VC6.0中安装STLPort4.6.2 (一)
- VC6.0下STLPort4.6.2安装手记
- 屏蔽vc6使用STL容器时的warning
- 如何在VC6中使用SGI-STL
- VC6 STL使用时候很多warning, stl使用以及消除warning的方法如下
- 在Solaris 10 for SPARC下编译STLport4.6.2
- 不要使用VC6自带的STL
- STL之Deque的使用方法
- 显示目录大小,显示进程所使用的port的命令
- STL使用入门( Using STL)
- 使用CSerialPort类编写串口通信程序的问题
- STL 中map的使用