我的班级目前看起来像这样
class Hist
{
private:
typedef boost::tuple<double,double,double> tuple;
typedef boost::shared_ptr<tuple> shared_tuple;
typedef std::vector<shared_tuple> tuple_vector;
typedef boost::shared_ptr<tuple_vector> shared_tuple_vector;
typedef std::map<int,shared_tuple_vector> inner_map;
typedef boost::shared_ptr<inner_map> shared_inner_map;
static std::map<std::string, shared_inner_map> stat_History_base;
static bool CheckStatus(std::string symb );
};
然后我有这个方法,它导致了一个非常非常大的链接器错误。
bool Hist::CheckStatus(std::string symb )
{
std::map<std::string,Hist::shared_inner_map>::iterator found = stat_History_base.find(symb);
if(found != stat_History_base.end())
{
//Symbol does exist
return true;
}
else
{
return false;
}
}