(转)stlport使用注意

使用STLport注意.
2007-11-14 21:05

1. 如果不打算使用iostream而只使用STL,不必编译STLport,
把stlport/stl/config/user_config.h中的:
/*
#define _STLP_NO_IOSTREAMS 1
*/
改成:
#define _STLP_NO_IOSTREAMS 1
在你的项目中确保stlport下的文件先被编译器搜索到。

2. STLport 不支持单线程运行时库,而vc6控制台程序默认采用单线程运行时库.

STLport 5.1.4 是不支持单线程运行时库的,如果你遇到下列错误,
请在VC6: Project > Settings > C/C++ > Code Generation >
Use run-time library:
不要选择single threaded或者debug single threaded.
其他MD,MDd,MT,MTd都是可以的.


Linking...
t01.obj : error LNK2001: unresolved external symbol "class stlpmtx_std::basic_ostream<char,class stlpmtx_std::char_traits<char> > stlpmtx_std::cout" (?cout@stlpmtx_std@@3V?$basic_ostream@DV?$char_traits@D@stlpmtx_std@@@1@A)
t01.obj : error LNK2001: unresolved external symbol "private: static void __cdecl stlpmtx_std::D__A::_M_deallocate(void *,unsigned int)" (?_M_deallocate@D__A@stlpmtx_std@@CAXPAXI@Z)
t01.obj : error LNK2001: unresolved external symbol "private: static void * __cdecl stlpmtx_std::D__A::_M_allocate(unsigned int &)" (?_M_allocate@D__A@stlpmtx_std@@CAPAXAAI@Z)
t01.obj : error LNK2001: unresolved external symbol "protected: void __thiscall stlpmtx_std::ios_base::_M_throw_failure(void)" (?_M_throw_failure@ios_base@stlpmtx_std@@IAEXXZ)
t01.obj : error LNK2001: unresolved external symbol "public: __thiscall stlpmtx_std::locale::~locale(void)" (??1locale@stlpmtx_std@@QAE@XZ)
t01.obj : error LNK2001: unresolved external symbol "public: class stlpmtx_std::locale::facet * __thiscall stlpmtx_std::locale::_M_use_facet(class stlpmtx_std::locale::id const &)const " (?_M_use_facet@locale@stlpmtx_std@@QBEPAVfacet@12@ABVid@12@@Z)
t01.obj : error LNK2001: unresolved external symbol "public: __thiscall stlpmtx_std::locale::locale(class locale::locale const &)" (??0locale@stlpmtx_std@@QAE@ABV01@@Z)
Release/t01.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

 

转自:http://hi.baidu.com/huangyinghui/blog/item/19a5c0cc3da8251301e92889.html

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值