1>test_date_time.obj : error LNK2019: unresolved external symbol "public: static class boost::shared_ptr<class stlp_std::map<class stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >,unsigned short,struct stlp_std::less<class stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> > >,class stlp_std::allocator<struct stlp_std::pair<class stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> > const ,unsigned short> > > > __cdecl boost::gregorian::greg_month::get_month_map_ptr(void)" (?get_month_map_ptr@greg_month@gregorian@boost@@SA?AV?$shared_ptr@V?$map@V?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@GU?$less@V?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@G@stlp_std@@@2@@stlp_std@@@3@XZ) referenced in function "unsigned short __cdecl boost::date_time::month_str_to_ushort<class boost::gregorian::greg_month>(class stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> > const &)" (??$month_str_to_ushort@Vgreg_month@gregorian@boost@@@date_time@boost@@YAGABV?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@@Z)
总之是一些看不懂的,这是因为没有包含一个人头文件所致:
#include "libs/date_time/src/gregorian/greg_month.cpp"可以解决这个问题