【问题标题】:Strange linker error when using Boost Interprocess 1.60 release build使用 Boost Interprocess 1.60 版本构建时出现奇怪的链接器错误
【发布时间】:2016-02-05 02:35:10
【问题描述】:

我们有一些代码使用 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自动引入的。

【问题讨论】:

    标签: c++ visual-studio-2010 boost boost-interprocess


    【解决方案1】:

    似乎这与项目文件中的预编译头配置有关。在我的情况下,我可以将选项设置为不使用预编译的标头,并且效果很好。 这里有一个线程可以详细了解它 here

    【讨论】:

      猜你喜欢
      • 2016-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-11
      • 2013-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多