QT编译过程会使用比较大的硬盘空间,大约占有5-6G。
1.先安装好vs2010,然后去qt网站上下载qt-everywhere-opensource-src-4.7.4.zip 解压到相应
磁盘目录(我的是E:),然后发现有个叫qt-everywhere-opensource-src-4.7.4的文件夹,修改
文件夹名字为qt,此时我的qt安装根目录是e:\qt
在开始栏中找到visual studio的工具visual studio命令提示符(2010)。我编译机器是32位的
所以,就只用最下面那个visual studio命令提示符(2010)。双击该程序
试着 cd e:\qt
在e:\qt下输入 configure -platform win32-msvc2010
-debug-and-release -nomake examples -nomake demos
后根据提示按o(开源协议),y(开始)
等待configure完成。
(mingw编译去掉-platform参数,configure以后用mingw32-make编译)
说明:你可以输入configure -help事先查看说明
-prefix 指定的就是安装目录
-platform 选择编译平台