PDA

View Full Version : QT with visual c++ 2005



v3n0w
16th March 2007, 06:41
Hello guys!

I do all the things of this one http://kjellkod.blogspot.com/2007/02/qt4-on-free-ide-visual-studio-express.html

The make was OK, all the exe are working fine.

But when i compile a project i get this linking errors:

QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication@@UAE@XZ) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QPushButton::~QPushButton(void)" (__imp_??1QPushButton@@UAE@XZ) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec@QApplication@@SAHXZ) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWidget::show(void)" (__imp_?show@QWidget@@QAEXXZ) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWidget::resize(int,int)" (__imp_?resize@QWidget@@QAEXHH@Z) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString@@QAE@XZ) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QPushButton::QPushButton(class QString const &,class QWidget *)" (__imp_??0QPushButton@@QAE@ABVQString@@PAVQWidget@ @@Z) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(char const *)" (__imp_??0QString@@QAE@PBD@Z) referenced in function _main
QTteste.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication@@QAE@AAHPAPADH@Z) referenced in function _main



Thanks for the support ;)

jacek
16th March 2007, 12:11
It looks like you don't link your application with Qt libraries.

v3n0w
16th March 2007, 17:39
It looks like you don't link your application with Qt libraries.

I know but, the tutorial only says that %(QTDIR)\lib, must be in the librarys of visual... And there is.

jacek
16th March 2007, 19:47
I know but, the tutorial only says that %(QTDIR)\lib, must be in the librarys of visual... And there is.
But that's only a path. You still have to tell VS which libraries it should use.

v3n0w
17th March 2007, 04:10
But that's only a path. You still have to tell VS which libraries it should use.

I do a project with qmake, and i get the config.. Now its ok :D

fengtian.we
20th May 2007, 13:37
what ? are you add "QT += sql " to .pro file?