PDA

View Full Version : Can somebody resolve this issue???



im_rajya
20th December 2006, 09:08
i m using
qt-win-opensource-4.2.2-mingw.exe on win xp

i have done every installation and environ variable setting.

i ran this prgram:

#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}

then performed following steps:
i saved it in this dir:
D:\qt ex\hello

then on command -prompt:

D:\qt ex\hello>qmake -project

D:\qt ex\hello>qmake hello.pro

D:\qt ex\hello>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `D:/qt ex/hello'
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
LL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
-I"D:/Qt/include/QtCore" -I"D:/Qt/include/QtCore" -I"D:/Qt/include/QtGui" -I"D:
/Qt/include/QtGui" -I"D:/Qt/include" -I"." -I"D:/Qt/include/ActiveQt" -I"release
" -I"." -I"..\..\Qt\mkspecs\win32-g++" -o release\hello.o hello.cpp
hello.cpp:9:3: warning: no newline at end of file
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\hello.exe" rel
ease\hello.o -L"d:\Qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:msvcprt ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
release\hello.o(.text+0x5f):hello.cpp: undefined reference to `_imp___ZN12QAppli
cationC1ERiPPci'
release\hello.o(.text+0x6a):hello.cpp: undefined reference to `_imp___ZN7QString
16fromAscii_helperEPKci'
release\hello.o(.text+0xb5):hello.cpp: undefined reference to `_imp___ZN6QLabelC
1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE'
release\hello.o(.text+0x104):hello.cpp: undefined reference to `_imp___ZN12QAppl
ication4execEv'
release\hello.o(.text+0x11c):hello.cpp: undefined reference to `QApplication::~Q
Application()'
release\hello.o(.text+0x167):hello.cpp: undefined reference to `QApplication::~Q
Application()'
release\hello.o(.text+0x1ae):hello.cpp: undefined reference to `_imp___ZN7QStrin
g4freeEPNS_4DataE'
release\hello.o(.text+0x1bc):hello.cpp: undefined reference to `_imp___ZN7QStrin
g4freeEPNS_4DataE'
d:\Qt\lib\qtmain.lib(tmp/obj/release_shared/qtmain_win.obj)(.text[_WinMain@16]+0
x7):.\qtmain_win.cpp: undefined reference to `_imp_?shared_null@QByteArray@@0UDa
ta@1@A'
d:\Qt\lib\qtmain.lib(tmp/obj/release_shared/qtmain_win.obj)(.text[_WinMain@16]+0
x1c):.\qtmain_win.cpp: undefined reference to `_imp_?WindowsVersion@QSysInfo@@2W
4WinVersion@1@B'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\hello.exe] Error 1
mingw32-make[1]: Leaving directory `D:/qt ex/hello'
mingw32-make: *** [release] Error 2

this error i got.
Now sombody plz help me....

thnx

joseph
20th December 2006, 10:37
try this


D: ..\YourProjectpath\ qmake projectfile.pro

D: ..\YourProjectpath\ nmake