2016-02-05 65 views
0

时出现奇怪的链接器错误我们有一些代码使用Boost Interprocess来管理共享内存。它把反对我们的升压1.60的调试版本罚款,并将其链接对我们加速1.55的发行版本,而是针对我们的升压1.60的发行版本链接时,我得到这两个错误:当使用Boost Interprocess 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)" ([email protected][email protected][email protected]@@[email protected]@@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)" ([email protected]?$has_member_function[email protected][email protected]@@[email protected][email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected][email protected]@@@[email protected]@@[email protected]@@QAEXXZ)

Googling around我在Boost邮件列表中发现了this报告,但这里没有解决方案。

编译器是Visual Studio 2010,这些库是由Boost自动引入的。

回答

2

似乎与项目文件中的预编译头配置有关。在我的情况下,我可以设置选项不使用预编译头,它工作正常。 这里有一个线索可以详细了解它 here

相关问题