解壓縮到C:\qt-everywhere-opensource-src-4.7.4
我們使用VS2008來作compiler
開啟VS2008的command Prompt,在windows7-64bits要使用x64(參下圖)
進到 C:\qt-everywhere-opensource-src-4.7.4的目錄下
使用configure.exe 來設定所要的LIBs定義
例如
configure.exe -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-ltcg
會先出現
Which edition of Qt do you want to use ?
Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.
請按o選擇OpenSource版
接下來出現
This is the Qt for Windows Open Source Edition.
You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 2.1
or the GNU General Public License (GPL) version 3.
Type '3' to view the GNU General Public License version 3 (GPLv3).
Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1).
Type 'y' to accept this license offer.
Type 'n' to decline this license offer.
Do you accept the terms of the license?
當然按y,開始進行定義,時間需要20分鐘左右
完成後,請輸入nmake,開始進行compiler這大約需要1個小時。
全部完成後,進到bin中就可以看到所完成的執行檔。
記得要設定PATH 到C:\qt-everywhere-opensource-src-4.7.4\bin
執行qtdemo.exe來玩玩