我正在使用VS10的boost 1_53庫。
我在鏈接過程中遇到了許多未解決的符號。像下面這樣:來自boost文件系統的未解決符號
error LNK2019: unresolved external symbol "void __cdecl boost_1_53_0::filesystem::path_traits::convert(char const *,char const *,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > &,class std::codecvt<unsigned short,char,int> const &)" ([email protected][email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) referenced in function "void __cdecl boost_1_53_0::filesystem::path_traits::convert(char const *,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > &,class std::codecvt<unsigned short,char,int> const &)" ([email protected][email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z)
我檢查/ LIBPATH設置正確,也是「boost_1_53_0_filesystem-mt.lib」的鏈接線即將到來。
我用DUMPBIN找到「LIB」符號來它像:
00000036 REL32 00000000 515 [email protected][email protected]@[email protected]@[email protected][email protected][email protected]@@[email protected][email protected]@@[email protected]@[email protected][email protected]@@Z (void __cdecl boost_1_53_0::filesystem::path_traits::convert(char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class std::codecvt<wchar_t,char,int> const &))
是該參數的變化引起的問題?
編輯:
我想補充更多的細節:
以前我是用升壓1_48這是工作的罰款。 我發現,在升壓下path_traits 1_48符號與@ GDH @ 5 @@ž whicle升壓1_53與@ _WDH @ 5 @@ž
但仍試圖尋找synbol結束與結束結束@ GDH @ 5 @@ Z
這可能會導致錯誤?
如果是這樣,爲什麼它採取這種符號?
如果增強庫建立在發佈模式下,你只能在發佈模式下鏈接 –
@Thomas:我只在發佈模式下使用它 – Abhi
然後,這可能有所幫助:http://stackoverflow.com/questions/8075315/ boost-filesystem-tutorial-wont-compile –