Hi,
I've got problems when trying to compile simple hello world program in vs6 using
qt3.4.0.
it's code is:
#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 );
hello.show();
return a.exec();
}
As written in the manual, I've set env variables like this:
QTDIR set to C:\Qt\4.3.0, PATH set to C:\Qt\4.3.0\bin, C:\MinGW\bin to PATH, D:\WINDOWS\System32 to PATH, QMAKESPEC set to win32-g++.
In vs6 I've set all library and include paths.
But build goes to errors (compilation is ok).
Linking...
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication@@UAE@XZ)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QPushButton::~QPushButton(void)" (__imp_??1QPushButton@@UAE@XZ)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec@QApplication@@SAHXZ)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWidget::show(void)" (__imp_?show@QWidget@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWidget::resize(int,int)" (__imp_?resize@QWidget@@QAEXHH@Z)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString@@QAE@XZ)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QPushButton::QPushButton(class QString const &,class QWidget *)" (__imp_??0QPushButton@@QAE@ABVQString@@PAVQWidget@ @@Z)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(char const *)" (__imp_??0QString@@QAE@PBD@Z)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication@@QAE@AAHPAPADH@Z)
Release/main.exe : fatal error LNK1120: 9 unresolved externals
Error executing link.exe.
What does this error mean, and how to fix it?
The same problem has allready been solved here: http://www.qtcentre.org/forum/f-installation-5/t-ms-visual-studio-6-problems-3388.html , but without a good conclusion.
If you had some ideas to help, it would be good.
thanks
-jan