VS2015下 boost log 无法链接(真正解决问题)
在VS2015下编译基于Boost log库的trivial例子时,编译器报出错误信息:
2>logtrivial_test1.obj : error LNK2019: 无法解析的外部符号 "public: static void __cdecl boost::log::v2s_mt_nt6::record_view::public_data::destroy(struct boost::log::v2s_mt_nt6::record_view::public_data const *)" (?destroy@public_data@record_view@v2s_mt_nt6@log@boost@@SAXPBU12345@@Z),该符号在函数 "public: void __thiscall boost::log::v2s_mt_nt6::record::reset(void)" (?reset@record@v2s_mt_nt6@log@boost@@QAEXXZ) 中被引用
2>logtrivial_test1.obj : error LNK2019: 无法解析的外部符号 "public: bool __thiscall boost::log::v2s_mt_nt6::core::get_logging_enabled(void)const " (?get_logging_enabled@core@v2s_mt_nt6@log@boost@@QBE_NXZ),该符号在函数 "public: class boost::log::v2s_mt_nt6::record __thiscall boost::log::v2s_mt_nt6::sources::basic_composite_logger<char,class boost::log::v2s_mt_nt6::sources::severity_logger_mt<enum boost::log::v2s_mt_nt6::trivial::severity_level>,struct boost::log::v2s_mt_nt6::sources::multi_thread_model<class boost::log::v2s_mt_nt6::aux::light_rw_mutex>,struct boost::log::v2s_mt_nt6::sources::features<struct boost::log::v2s_mt_nt6::sources::severity<enum boost::log::v2s_mt_nt6::trivial::severity_level> > >::open_record<struct boost::parameter::aux::tagged_argument<struct boost::log::v2s_mt_nt6::keywords::tag::severity,enum boost::log::