关于vc++6.0 与 stlport5.1.5的问题.
只用stl 不用iostream 可以不用编译.按提示解压缩后.
tools->options->directories->include files 里加入了 ..\STLPORT-5.1.5\STLPORT 且上移到第一个.
并把..\STLPORT-5.1.5\STLPORT\STL\CONFIG 下的 user_config.h里的
/* #define _STLP_NO_IOSTREAMS 1 */
改为了
#define _STLP_NO_IOSTREAMS 1
程序引入如下头文件.
#include <iostream>
#include <vector>
using namespace std;
代码省略...
build时报错.
d:\tools\c_lib\stlport-5.1.5\stlport\stl\_ioserr.h(9) : fatal error C1189: #error : STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h).
_ioserr.h内容如下
#if defined (_STLP_NO_IOSTREAMS)
# error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h).
#elif defined (_STLP_USE_NO_IOSTREAMS )
# error STLport iostreams header cannot be used; your compiler do not support it.
#endif
不能使用 iostream 头文件.
把 #define _STLP_NO_IOSTREAMS 1 重新给注释掉.
又报下面错.
LINK : fatal error LNK1104: cannot open file "stlportd_static.5.1.lib"
很是头疼.除非不用 stlport 才不会出错.
请大家给个解决方案.