vs2010 编译 64位 Qt4.8.6实践之旅

QT官网只有32位版本QT,尚不提供64位版本,那么如何才能获取到我们需要的64位版本呢? 答案是 源码编译。

1、首先确保windows平台已经安装了vs2010

2、获取官网源码

从以下官网下载源码,然后解压到windows本地目录。

http://download.qt.io/archive/qt/4.8/4.8.6/

2、打开vs2010的命令提示行终端

从程序目录中选择Visual Studio 2010->Visual Studio tools->Visual Studio 2010 x64 Win64 Command Prompt,点击打开

3、配置

在终端上切换到第1步骤中的解压目录,然后键入以下命令,根据需要二选一即可

PS:DOS的目录切换命令,相信大家会操作。

  • 对所有QT组件进行configure,花费时间较长。

configure -debug-and-release -opensource -platform win32-msvc2010

  • 对指定组件进行configure

configure -opensource -nomake demos -nomake examples -platform win32-msvc2010 -webkit

PS:在执行第二步时会要求键入y(同意一些开源协议Do you accept the terms of the license?)。

4、编译

配置完成后,输入nmake命令启动编译。

5、安装

编译完成后,键入“nmake install”命令完成Qt安装。安装完成后,会得到Qt相应的包含目录(头文件),dll、lib库文件。

发布了3 篇原创文章 · 获赞 4 · 访问量 969

猜你喜欢

转载自blog.csdn.net/hhd1988/article/details/104323895
今日推荐