链接qt库错误



我有一个链接问题。我安装了Visual Studio 2012,下载了qt源代码,并为vc 2012编译了它,它与Visual Studio插件一起工作得很好。然后我下载了Boost并编译了它。

在控制台应用程序上,Boost可以正常工作,但是如果我创建一个qt项目并想在那里使用Boost(文件系统库),我会得到一个链接错误:

error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""void __cdecl boost::filesystem::path_traits::convert(char const *,char const * .......
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::codecvt<unsigned short,char,int> const & __cdecl boost::filesystem::path::codecvt(void)......
fatal error LNK1120: 2 nicht aufgelöste Externe

它在英语中的意思是"未解析的外部符号" .

我使用了相同的包含路径和库路径,但是我花了几个小时都解决不了这个问题。即使没有,如果我编译Boost与mingw选项

有谁知道怎么解决这个问题吗?

好的,我想我找到了解决方案,不是它工作得很好。

这是一个小的区别,但它浪费了几个小时的搜索。最后这个链接解决了问题:链接解决。它是第一条评论中的链接。我只需要改变在visual studio中:project properties -> c/c++ -> language ->将wchar_t视为内置类型:yes。然后程序将正确链接

最新更新