用 uic -i form1.h -o form1.cpp form1.ui形式的命令将设计的ui文件生成cpp文件,再将cpp编译成exe文件但是编译出错,没有exe文件生成,是怎么回事?命令行显示如下:
C:\Qt\4.2.3\hwt>make
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory `C:/Qt/4.2.3/hwt'
c:\Qt\4.2.3\bin\uic.exe hwt2.ui -o ui_hwt2.h
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DWIN_CO
NFIGURATION -DEURO_TIME -DLOG_STOPWATCH -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT
_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.2.3/include/QtCore" -I"C:/Qt/4.2.3/i
nclude/QtCore" -I"C:/Qt/4.2.3/include/QtGui" -I"C:/Qt/4.2.3/include/QtGui" -I"C:
/Qt/4.2.3/include" -I"." -I"C:/Qt/4.2.3/include/ActiveQt" -I"tmp\moc\debug_share
d" -I"." -I"..\mkspecs\win32-g++" -o tmp\obj\debug_shared\hwt2.o hwt2.cpp
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-subsystem,windows -o "debug\hwt.exe" tmp\obj\debug_shared\
hwt2.o -L"c:\Qt\4.2.3\lib" -L"c:\Qt\4.2.3\lib" -lmingw32 -lqtmaind -lQtGuid4 -l
QtCored4
c:\Qt\4.2.3\lib/libqtmaind.a(qtmain_win.o)(.text+0x30b): In function `WinMain':
C:/Qt/4.2.3/src/winmain/qtmain_win.cpp:105: undefined reference to `qMain(int, c
har**)'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\hwt.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.2.3/hwt'
mingw32-make: *** [debug-all] Error 2
C:\Qt\4.2.3\hwt>