I just downloaded Qt-non-commercial for windows and began programming. But I immediately ran into some major problems. I'm building the program under MS VC++ 6.0. I've added c:\qt\include to the include path and c:\qt\lib to the library path. The program compiles fine but linking fails with a bunch of wierd errors. For example, building this program:
I get these errors:Code:#include <qapplication.h> #include <qpushbutton.h> int main( int argc, char **argv ) { QApplication a( argc, argv ); QPushButton hello( "Hello world!", 0 ); hello.resize( 100, 30 ); a.setMainWidget( &hello ); hello.show(); return a.exec(); }
Any suggestions?Code:--------------------Configuration: tut1 - Win32 Debug-------------------- Linking... tut1.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall QApplication::~QApplication(void)" (??1QApplication@@UAE@XZ) tut1.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall QPushButton::~QPushButton(void)" (??1QPushButton@@UAE@XZ) tut1.obj : error LNK2001: unresolved external symbol "public: int __thiscall QApplication::exec(void)" (?exec@QApplication@@QAEHXZ) tut1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QWidget::show(void)" (?show@QWidget@@UAEXXZ) tut1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QApplication::setMainWidget(class QWidget *)" (?setMainWidget@QApplication@@UAEXPAVQWidget@@@Z) tut1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QPushButton::resize(int,int)" (?resize@QPushButton@@UAEXHH@Z) tut1.obj : error LNK2001: unresolved external symbol "public: __thiscall QPushButton::QPushButton(class QString const &,class QWidget *,char const *)" (??0QPushButton@@QAE@ABVQString@@PAVQWidget@@PBD@Z) tut1.obj : error LNK2001: unresolved external symbol "public: __thiscall QString::QString(char const *)" (??0QString@@QAE@PBD@Z) tut1.obj : error LNK2001: unresolved external symbol "public: __thiscall QApplication::QApplication(int &,char * *)" (??0QApplication@@QAE@AAHPAPAD@Z) tut1.obj : error LNK2001: unresolved external symbol "public: void __thiscall QStringData::deleteSelf(void)" (?deleteSelf@QStringData@@QAEXXZ) tut1.obj : error LNK2001: unresolved external symbol "private: static struct QStringData * QString::shared_null" (?shared_null@QString@@0PAUQStringData@@A) LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/tut1.exe : fatal error LNK1120: 12 unresolved externals Error executing link.exe. tut1.exe - 13 error(s), 0 warning(s)
Cheers,
cgkanchi




Reply With Quote