首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

boost:locale:conv:between()调试不通过解决方法

2013-09-17 
boost::locale::conv::between()调试不通过#include string#include boost/locale/conversion.hpp#inc

boost::locale::conv::between()调试不通过



#include <string>
#include <boost/locale/conversion.hpp>
#include <boost/locale/encoding.hpp>

using namespace std;
using namespace boost;

string s = "d啊";
string ss = conv::between( s, "UTF-8", "GBK" );


F:\testCpp\testCpp\main.cpp:-1: 错误:undefined reference to `boost::locale::conv::between(char const*, char const*, std::string const&, std::string const&, boost::locale::conv::method_type)' boost
[解决办法]
不好意思,我看错了

string ss = boost::locale::conv::between( s, "UTF-8", "GBK" );

[解决办法]
你只using了boost,并没有using boost::locale
[解决办法]
查了下手册,好像的确是要先编译,很抱歉误导lz了

热点排行