Qt 创建可执行文件
有没有一种快速、直接的方法将 Qt 应用程序变成可执行文件? 我尝试按照 http://doc.qt.digia.com 上的说明进行操作/4.1/deployment-windows.html 但到目前为止尚未成功; 我无法提供任何帮助,将不胜感激。 谢谢!
Is there a quick, straightforward way to make a Qt application into an executable? I attempted to follow the instructions at http://doc.qt.digia.com/4.1/deployment-windows.html but have been unsuccesfull thus far; I'm unable to Any help would be much appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我总是使用 CMake 来构建 Qt 项目,它简单、免费且跨平台。 指南:使用 CMake 编译 Qt4 应用。 CMake 还附带 CPack,可以轻松制作 Windows、Mac 和 Linux 的安装程序。
我同意 chmod700 关于 Qt Creator 的建议,它不是我最喜欢的 IDE,但它仍然非常好且简单。
I always use CMake to build Qt projects, it's easy, free and cross platform. Guide : Compiling Qt4 apps with CMake. CMake also come with CPack to easly make installer for Windows, Mac and Linux.
I agree with chmod700 about the Qt Creator suggestion, it's not my favorite IDE but it's still really nice and easy.
你的意思是安装包吗? 我假设您能够编译、链接和运行您的应用程序,并且您的意思是如何为其他人打包它。
http://installbuilder.bitrock.com/ <-- 基于 Qt 的项目的特殊处理,但成本 $
http://www.jrsoftware.org/isinfo.php <-- 我个人的最爱而且它是免费的(虽然学习高级功能可能很困难)
但是如果您的意思是如何构建您的应用程序,您可能想尝试新的 Qt Creator (http://www.qtsoftware.com/products/appdev/developer-tools/developer-tools#qt- tools-at-a),它将为您设置构建目标,并真正使桌面 Qt 开发变得轻而易举。 此外,如果您仍在使用 4.1,您现在可以在所有平台上根据 LGPL 使用 4.5,这使得升级几乎是理所当然的。
Do you mean an installer package? I assume you are able to compile, link, and run your app and you mean how do you package it up for others.
http://installbuilder.bitrock.com/ <-- special handling of Qt based projects but costs $
http://www.jrsoftware.org/isinfo.php <-- my personal favorite and it's free (can be rough to learn advanced features though)
Though if you mean how do you build your app, you may want to try the new Qt Creator (http://www.qtsoftware.com/products/appdev/developer-tools/developer-tools#qt-tools-at-a) which will setup build targets for you and really makes desktop Qt dev a snap. Also if you're still using 4.1, you can now use 4.5 under the LGPL on all platforms making it almost a no-brainer to upgrade.
我不确定我是否理解你的问题。 假设您正在使用 MinGW,这非常简单:
c:\Qt\4.5.0-static
),然后%PATH%
变量中。configure -static
。 如果您愿意,您可以添加其他配置选项,但通常您不需要这样做。c:\Qt\4.5.0-static\bin\qmake
中上面给出的例子。make
使用 Visual Studio 执行相同的操作非常相似。
或者您想动态构建并创建安装程序包?
I'm not sure if I understand your problem. Assuming you're using MinGW, it's really easy and quite straightforward:
c:\Qt\4.5.0-static
)%PATH%
variable.configure -static
. You can add other config options if you like to, but usually you don't need that.c:\Qt\4.5.0-static\bin\qmake
in the example given above.make
Doing the same using Visual Studio is pretty similar.
Or do you want to build dynamically and create an installer package?