2016-02-05 64 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

相關問題