vs2015 64位下boost log 无法链接

在使用VS2015进行64位编译时遇到boost log库无法链接的问题,错误信息表明问题与配置有关。通过修改boost/detail/winapi/config.hpp文件,将BOOST_USE_WINAPI_VERSION的值设置为大于BOOST_WINAPI_VERSION_WINXP,从而解决了链接错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

vs2015 64位下boost log 无法链接

错误信息

1>main.obj : error LNK2019: 无法解析的外部符号 "private: static unsigned int __cdecl boost::log::v2s_mt_nt5::attribute_name::get_id_from_string(char const *)" (?get_id_from_string@attribute_name@v2s_mt_nt5@log@boost@@CAIPEBD@Z),该符号在函数 "public: __cdecl boost::log::v2s_mt_nt5::attribute_name::attribute_name(char const *)" (??0attribute_name@v2s_mt_nt5@log@boost@@QEAA@PEBD@Z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 "public: class boost::log::v2s_mt_nt5::attribute_value_set::const_iterator __cdecl boost::log::v2s_mt_nt5::attribute_value_set::end(void)const " (?end@attribute_value_set@v2s_mt_nt5@log@boost@@QEBA?AVconst_iterator@1234@XZ),该符号在函数 "public: class boost::log::v2s_mt_nt5::visitation_result __cdecl boost::log::v2s_mt_nt5::value_visitor_invoker<struct boost::mpl::vector2<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > >,struct boost::log::v2s_mt_nt5::fallback_to_none>::operator()<struct boost::log::v2s_mt_nt5::binder1st<struct boost::log::v2s_mt_nt5::output_fun,class boost::log::v2s_mt_nt5::expressions::aux::stream_ref<class boost::log::v2s_mt_nt5::basic_formatting_ostream<char,struct std::char_traits<char>,class std::allocator<char> > > &> >(class boost::log::v2s_mt_nt5::attribute_name const &,class boost::log::v2s_mt_nt5::attribute_value_set const &,struct boost::log::v2s_mt_nt5::binder1st<struct boost::log::v2s_mt_nt5::output_fun,class boost::log::v2s_mt_nt5::expressions::aux::stream_ref<class boost::log::v2s_mt_nt5::basic_formatting_ostream<char,struct std::char_traits<char>,class std::allocator<char> > > &>)const " (??$?RU?$binder1st@Uoutput_fun@v2s_mt_nt5@log@boost@@AEAV?$stream_ref@V?$basic_formatting_ostream@DU?$char_traits@D@std@@V?$allocator@D@2@@v2s_mt_nt5@log@boost@@@aux@expressions@234@@v2s_mt_nt5@log@boost@@@?$value_visitor_invoker@U?$vector2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@mpl@boost@@Ufallback_to_none@v2s_mt_nt5@log@3@@v2s_mt_nt5@log@boost@@QEBA?AVvisitation_result@123@AEBVattribute_name@123@AEBVattribute_value_set@123@U?$binder1st@Uoutput_fun@v2s_mt_nt5@log@boost@@AEAV?$stream_ref@V?$basic_formatting_ostream@DU?$char_traits@D@std@@V?$allocator@D@2@@v2s_mt_nt5@log@boost@@@aux@expressions@234@@123@@Z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 "public: class boost::log::v2s_mt_nt5::attribute_value_set::const_iterator __cdecl boost::log::v2s_mt_nt5::attribute_value_set::find(class boost::log::v2s_mt_nt5::attribute_name)const " (?find@attribute_value_set@v2s_mt_nt5@log@boost@@QEBA?AVconst_iterator@1234@Vattribute_name@234@@Z),该符号在函数 "public: class boost::log::v2s_mt_nt5::visitation_result __cdecl boost::log::v2s_mt_nt5::value_visitor_invoker<struct boost::mpl::vector2<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > >,struct boost::log::v2s_mt_nt5::fallback_to_none>::operator()<struct boost::log::v2s_mt_nt5::binder1st<struct boost::log::v2s_mt_nt5::output_fun,class boost::log::v2s_mt_nt5::expressions::aux::stream_ref<class boost::log::v2s_mt_nt5::basic_formatting_ostream<char,struct std::char_traits<char>,class std::allocator<char> > > &> >(class boost::log::v2s_mt_nt5::attribute_name const &,class boost::log::v2s_mt_nt5::attribute_value_set const &,struct boost::log::v2s_mt_nt5::binder1st<struct boost::log::v2s_mt_nt5::output_fun,class boost::log::v2s_mt_nt5::expressions::aux::stream_ref<class boost::log::v2s_mt_nt5::basic_formatting_ostream<char,struct std::char_traits<char>,class std::allocator<char> > > &>)const " (??$?RU?$binder1st@Uoutput_fun@v2s_mt_nt5@log@boost@@AEAV?$stream_ref@V?$basic_formatting_ostream@DU?$char_traits@D@std@@V?$allocator@D@2@@v2s_mt_nt5@log@boost@@@aux@expressions@234@@v2s_mt_nt5@log@boost@@@?$value_visitor_invoker@U?$vector2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@mpl@boost@@Ufallback_to_none@v2s_mt_nt5@log@3@@v2s_mt_nt5@log@boost@@QEBA?AVvisitation_result@123@AEBVattribute_name@123@AEBVattribute_value_set@123@U?$binder1st@Uoutput_fun@v2s_mt_nt5@log@boost@@AEAV?$stream_ref@V?$basic_formatting_ostream@DU?$char_traits@D@std@@V?$allocator@D@2@@v2s_mt_nt5@log@boost@@@aux@expressions@234@@123@@Z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 "public: static void __cdecl boost::log::v2s_mt_nt5::record_view::public_data::destroy(struct boost::log::v2s_mt_nt5::record_view::public_data const *)" (?destroy@public_data@record_view@v2s_mt_nt5@log@boost@@SAXPEBU12345@@Z),该符号在函数 "public: void __cdecl boost::log::v2s_mt_nt5::record::reset(void)" (?reset@record@v2s_mt_nt5@log@boost@@QEAAXXZ) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 "public: static class boost::shared_ptr<class boost::log::v2s_mt_nt5::core> __cdecl boost::log::v2s_mt_nt5::core::get(void)" (?get@core@v2s_mt_nt5@log@boost@@SA?AV?$shared_ptr@Vcore@v2s_mt_nt5@log@boost@@@4@XZ),该符号在函数 "class boost::shared_ptr<class boost::log::v2s_mt_nt5::sinks::synchronous_sink<class boost::log::v2s_mt_nt5::sinks::text_file_backend> > __cdecl boost::log::v2s_mt_nt5::aux::add_file_log<struct boost::parameter::aux::tagged_argument<struct boost::log::v2s_mt_nt5::keywords::tag::file_name,char const [11]> >(struct boost::parameter::aux::tagged_argument<struct boost::log::v2s_mt_nt5::keywords::tag::file_name,char const [11]> const &)" (??$add_file_log@U?$tagged_argument@Ufile_name@tag
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值