boost文件系统中未解析的符号 [英] unresolved symbols from boost filesystem

查看:142
本文介绍了boost文件系统中未解析的符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS10中使用boost 1_53库.
链接期间出现许多未解决的符号.类似于以下内容:

I am using boost 1_53 libraries with VS10.
I am getting many unresolved symbols during linking. like the following:

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 &)" (?convert@path_traits@filesystem@boost_1_53_0@@YAXPEBD0AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEBV?$codecvt@GDH@5@@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 &)" (?convert@path_traits@filesystem@boost_1_53_0@@YAXPEBDAEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEBV?$codecvt@GDH@5@@Z)

我检查了/LIBPATH是否正确设置,链接行中也出现了"boost_1_53_0_filesystem-mt.lib". 我用dumpbin在"lib"中找到符号,如下所示:

I checked /LIBPATH is set correctly also "boost_1_53_0_filesystem-mt.lib" is coming in link line.
i used dumpbin to find symbol in "lib" its coming like:

00000036  REL32 00000000 515  ?convert@path_traits@filesystem@boost_1_53_0@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEBV?$codecvt@_WDH@5@@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 &))

此参数更改是否引起问题?

Is this parameter change causing issue?


我想添加更多详细信息:
以前我使用的是Boost 1_48,效果很好. 我发现在path_traits下的增强1_48符号以 @ GDH @ 5 @@ Z 结尾,在增强1_53中的小提号以 @_ WDH @ 5 @@ Z
结尾 但是它仍然尝试搜索synbol以 @ GDH @ 5 @@ Z
结尾 这会导致错误吗?
如果是这样,为什么要使用该符号?


I like to add more details:
Previously i was using boost 1_48 which was working fine. I found that in boost 1_48 symbols under path_traits ends with @GDH@5@@Z whicle in boost 1_53 its ending with @_WDH@5@@Z
But still It trying to search synbol end with @GDH@5@@Z
This can cause error?
If so why its taking that symbols?

推荐答案

您可以检查是否未使用64位编译的Boost库而不是32位的库(反之亦然).这就是使用boost :: filesystem时发生的事情.

You can check if you are not using 64 bit compiled boost libraries instead of 32 bit ones (and vice versa). It's what happened for me while using boost::filesystem.

这篇关于boost文件系统中未解析的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆