Visual Studio 2010 Qt Link Problem

前端 未结 3 754
后悔当初
后悔当初 2021-02-10 04:57

I spent the weekend trying to figure this out and I\'m on the last step. My goal: to get visual studio 2010 and Qt 4.7.3 to work together.

I installed Qt from source, s

相关标签:
3条回答
  • 2021-02-10 05:36

    Haven't you forgot to specify Qt lib files for VS to link with? You'll probably need QtCored4.lib, QtGuid4.lib (d is for "debug", remove it in release config), and, maybe, some others. If the project that gives you trouble is .exe application - go to it's Properties->Linker->Command Line and add {Qored4.lib QtGuid4.lib} without the brackets.

    P. S. My recommendation: first, create a project in Qt Creator and test it. Then run qmake -tp vc -r - and you''l get a perfectly working solution for VS or any other major platform. Besides, Creator has a nice editor, you might like it.

    0 讨论(0)
  • 2021-02-10 05:39

    if u have created instance of Qt class QDomDocument. it might be necessary to add "QtXml4.lib" . Please add this lib in Visual studio ie Project->properties->Linker->Input====> Additional Dependencies.

    0 讨论(0)
  • 2021-02-10 05:44

    I see that your library directories is missing C:\qt_source\4.7.3\lib , include it.

    And then include

    QtCored4.lib QtGuid4.lib and any other Qt libraries

    required as Violet Giraffe suggested. You also need to do this with 'Release version'

    QtCore4.lib QtGui4.lib and any other Qt libraries

    CV

    0 讨论(0)
提交回复
热议问题