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

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了