QT 遇到的缺Debug lib问题1则

QT 遇到的缺Debug lib问题1则

问题:
我用QT DESIGNER產生了.ui檔之後,在經過
qmake -project test.ui =>造出a.pro之後
qmake a.pro =>造出了Makefile…..等等檔之後
make =>這裡會出現錯誤 如下!!
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/a’
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-subsystem,windows -o "debuga.exe" -L"C:Qt4.0.1lib" –
lmingw32 -lqtmaind -lQtCored4 -lQtGuid4
c:mingwbin..libgccmingw323.4.2……..mingw32binld.exe: cannot fin
d -lqtmaind
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debuga.exe] Error 1
mingw32-make[1]: Leaving directory `D:/a’
mingw32-make: *** [debug] Error 2
不知道是為什們??
 
解答:
這是因為你沒有編譯Qt之Debug的Lib。
安裝完Qt後,在Qt的工作群組裏應該有個
「Qt 4.0.1 (Build Debug Libraries)」的捷徑,點選它,
會跳至Console畫面,接著它會問一個版權的問題,你按
「y」,然後它就開始執行編譯Lib的動作,大約會花個
五小時以上吧!(我猜的,因為我該它自己Run後,就去睡大覺了!)
之後你再編譯程式時,就不會有類似的問題了!
ps:編譯Qt程式的指令順序
qmake -project
qmake
make
若要編譯release版,則最後一個指令改為make release;若不加
release,則make內定編譯成debug版。  

One thought on “QT 遇到的缺Debug lib问题1则

  1. wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling
    wow power leveling -229858669603040

Leave a Reply

Your email address will not be published. Required fields are marked *