1、VS2010使用boost_1_59_0编译Release时链接报错如下:
error LNK2001: 无法解析的外部符号 "public: void __thiscall boost::container::container_detail::has_member_function_named_construct<class boost::container::new_allocator<char> >::BaseMixin::construct(void)" (?construct@BaseMixin@?$has_member_function_named_construct@V?$new_allocator@D@container@boost@@@container_detail@container@boost@@QAEXXZ)
error LNK2001: 无法解析的外部符号 "public: void __thiscall boost::container::container_detail::has_member_function_named_construct<class boost::container::new_allocator<struct boost::container::container_detail::tree_node<struct std::pair<class boost::container::basic_string<char,struct std::char_traits<char>,class boost::container::new_allocator<char> > const ,struct boost::interprocess::ipcdetail::ref_count_ptr>,void *,0,1> > >::BaseMixin::construct(void)" (?construct@BaseMixin@?$has_member_function_named_construct@V?$new_allocator@U?$tree_node@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$new_allocator@D@container@boost@@@container@boost@@Uref_count_ptr@ipcdetail@interprocess@3@@std@@PAX$0A@$00@container_detail@container@boost@@@container@boost@@@container_detail@container@boost@@QAEXXZ)
检查链接路径等等相关配置均未解决问题,最后发现修改属性->常规->全程序优化的“使用链接时间代码生成”改成“无全程序优化”即可,具体原因未知。