Qt - 4.7.3 - 如何使静态构建 [英] Qt - 4.7.3 - How to make static build

查看:258
本文介绍了Qt - 4.7.3 - 如何使静态构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去几个月使用了4.7.2。现在我下载了4.7.3。现在我正在搜索键入configure -static。但我不知道在哪里地狱qt路径。

解决方案


  1. 下载源码包此处。下载并安装您最喜欢的perl发行版。我必须警告你,草莓perl有自己的工具链,可能会使用,而不是你下载的MinGW。


  2. 解压缩它说: C:\ Qt -source ,以便在 C:\ Qt-source configure.exe


    $ b

    ,在开始菜单中搜索Visual Studio文件夹中的CMD快捷方式。



    b)如果您使用MinGW,请使用随附的 mingwvars.cmd ,或打开命令提示符(运行 - >cmd.exe)并键入 set PATH = C:\path\to\mingw\bin;%PATH% code>。尝试 gcc -v 以查看是否可以找到它。


  3. C:\ Qt 。 Do set QTPATH = C:\Qt set PATH = C:\Qt\bin;%PATH% cd C:\ Qt ,然后键入:



    .. \Qt-source\configure -static


  4. 配置完成后,您必须键入 nmake mingw32-make


  5. 去做其他事情,因为需要一段时间。



I used 4.7.2 for the past months. Now I downloaded 4.7.3. Now I am searching to type "configure -static". But I don't know where the hell "the qt path". Can anybody shed a light on this issue.

解决方案

  1. Download the source package here. Download and install your favorite perl distribution. I must warn you that Strawberry perl comes with its own toolchain and that may get used instead of the MinGW you downloaded. Use ActivePerl if you don't want any trouble, or build it yourself.

  2. Unzip it to say, C:\Qt-source so that there is a configure.exe in C:\Qt-source

  3. Open the toolchain's command prompt

    a) If you're using the Visual Studio compiler, search in the "start" menu for a CMD shortcut in the Visual Studio folder. The Windows SDK also has this shortcut.

    b) If you're using MinGW, either use the accompanying mingwvars.cmd, or open a command prompt, (Run->"cmd.exe") and type set PATH=C:\path\to\mingw\bin;%PATH%. Try gcc -v to see if it can be found.

  4. Make a build directory, preferable something like C:\Qt. Do set QTPATH=C:\Qt and set PATH=C:\Qt\bin;%PATH% and cd C:\Qt, and type:

    ..\Qt-source\configure -static

  5. After configure finishes, you'll either have to type nmake (Visual Studio) or mingw32-make.

  6. Go do something else, because it will take a while.

这篇关于Qt - 4.7.3 - 如何使静态构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆