我们有一些代码使用Boost Interprocess来管理共享内存。它与我们的Boost 1.60的调试版本链接得很好,并且它链接到我们的Boost 1.55的发布版本,但是当链接到我们的Boost 1.60的发布版本时,我得到了这两个错误:
error LNK2001: unresolved external symbol "public: void __thiscall boost::container::container_detail::has_member_function_named_construct<class boost::container::new_allocator<char> >::BaseMixin::construct(void)" (?construct_at_BaseMixin@?$has_member_function_named_construct_at_V?$new_allocator_at_D@container_at_boost@@@container_detail_at_container@boost@@QAEXXZ)
error LNK2001: unresolved external symbol "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_at_BaseMixin@?$has_member_function_named_construct_at_V?$new_allocator_at_U?$tree_node_at_U?$pair@$$CBV?$basic_string_at_DU?$char_traits_at_D@std@@V?$new_allocator_at_D@container_at_boost@@@container_at_boost@@Uref_count_ptr_at_ipcdetail@interprocess_at_3@@std@@PAX$0A@$00_at_container_detail_at_container@boost@@@container_at_boost@@@container_detail_at_container@boost@@QAEXXZ)
谷歌上搜索了我在Boost邮件列表中发现的this报告,但那里没有解决方案。
编译器是Visual Studio 2010,Boost会自动引入这些库。