关于vc++6.0 与 stlport5.1.5的问题.

cx36001390 2008-04-08 02:02:19
只用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 才不会出错.
请大家给个解决方案.

...全文
252 7 打赏 收藏 举报
写回复
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
cx36001390 2008-04-08
  • 打赏
  • 举报
回复
嗯.最后的结论暂时先不用stlport了.

和我之前的代码有很大的冲突.
就呆在云上 2008-04-08
  • 打赏
  • 举报
回复
我知道啊
我也看过文档啊
但是这些个东西不好说
其实我觉得根本问题在于LINK : fatal error LNK1104: cannot open file "stlportd_static.5.1.lib"
就是说你没有这个库文件
不编译的话是没有的
如果你编译过stlport的话你就应该晓得
这个东西要通过编译出来,然后添加到vc的lib路径下去
taodm 2008-04-08
  • 打赏
  • 举报
回复
#include <iostream>
兄弟啊,那你这个算什么?
cx36001390 2008-04-08
  • 打赏
  • 举报
回复
不编译是不能用iostream

但是不用iostream的话可以不编译 stlport

这都是install里所说的.
就呆在云上 2008-04-08
  • 打赏
  • 举报
回复
不编译好像不能用吧
我用两个编译器
一个用系统自带的stl一个用stlport
建议编译一下
fallinleave 2008-04-08
  • 打赏
  • 举报
回复
没有编译STLPort
taodm 2008-04-08
  • 打赏
  • 举报
回复
那就编译啊。编译又不麻烦。
相关推荐
发帖
C++ 语言

6.3w+

社区成员

C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
帖子事件
创建了帖子
2008-04-08 02:02
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下