简体   繁体   English

链接QT库错误

[英]linking qt lib errors

I have a linking problem. 我有链接问题。 I installed Visual Studio 2012, downloaded qt-sourcecode and compiled it for vc 2012 and it is working fine together with the visual studio add-in. 我安装了Visual Studio 2012,下载了qt-sourcecode并针对vc 2012进行了编译,它与Visual Studio加载项一起正常工作。 Then I downloaded Boost and compiled it. 然后我下载了Boost并进行了编译。

On a console-application everything works fine with Boost, but if I create a qt-project and want to use Boost there (filesystem libary) , I get a linking error: 在控制台应用程序上,一切都可以通过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

it means "unresolved external symbol" in english.. 它的英文意思是“未解决的外部符号”。

I used the same including-paths and library-paths, but I can't solve this problem for hours. 我使用了相同的includes-paths和library-paths,但数小时无法解决此问题。 Even not if I compile Boost with mingw option 即使我用mingw选项编译Boost

Anybody have an idea how to solve this problem? 有人知道如何解决这个问题吗?

Okay, I think I found the solution, not it works fine. 好的,我想我找到了解决方案,但效果不佳。

It is a little difference but it has wasted hours of searching. 差异不大,但浪费了搜索时间。 Finally this link solved the problem: link to solution . 最后,此链接解决了问题: 链接到solution It is the link in the first comment. 这是第一个评论中的链接。 I only have to change in visual studio: project properties -> c/c++ -> langauge -> Treat wchar_t as Built-in Type: yes. 我只需要在Visual Studio中进行更改:项目属性-> c / c ++->语言->将wchar_t视为内置类型:是。 Then the program will link correctly 然后程序将正确链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM