没有Qt,Qt应用程序没有运行 [英] Qt application not running without Qt

查看:142
本文介绍了没有Qt,Qt应用程序没有运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试通过在另一个系统上复制它直接从调试文件夹运行我的应用程序(.exe),但它显示以下错误:



程序无法启动,因为您的计算机缺少Qt5 Widgets.dll。尝试重新安装程序来解决这个问题。



我搜索给定的.dll但无法在任何地方找到它。在每个.dll下载站点都没有这样的文件存在正在显示。任何想法或建议。

'm trying to run my application(.exe) directly from debug folder by copying it on another system,but it is showing the following errors:

The program can't start because Qt5 Widgets.dll is missing from your computer. Try reinstalling the program to fix this problem.

I searches for the given .dll but couldn't find it anywhere.On every .dll download sites no such file exists is showing. Any Idea or suggestions.

推荐答案

在您的开发机器上创建一个安装和部署项目 - 它应该自动包含并注册任何必要的DLL文件(可能在您的dev上机器无论如何,但可能需要在目标上进行配置。



无论如何,复制调试文件夹是一个糟糕的主意,因为调试EXE包含您可能不想分发的信息!
Create an Setup and Deployment project on your development machine - that should automatically include and register any necessary DLL files (which are probably on your dev machine anyway, but may need configuration on the target.

Just copying the debug folder is a poor idea anyway, as debug EXEs contain information you may not want to distribute!


尝试以下方法:

Try the following:


  1. 开发中下载并安装Qt 机器.Qt可以从 http://qt-project.org/downloads 下载[ ^ ]
  2. 上的< QtDir> / bin复制所需的DLL开发机器到客户端机器上的安装文件夹(存储可执行文件的文件夹)
  3. 如果可执行文件是构建的u唱一个Microsoft编译器,您可能还需要在客户端机器上安装该编译器的可再发行文件(对于32位Windows运行vcredist_x86.exe或对64位Windows运行vcredist_x64.exe)
  4. 如果使用MinGW编译器构建可执行文件,则必须在开发机器上安装MinGW(可以使用Qt在线安装程序完成),然后从< MinGWDir>中复制所需的DLL。 / bin到客户端机器上的安装文件夹。

  1. Download and install Qt on your development machine. Qt can be downloaded from http://qt-project.org/downloads[^]
  2. Copy the required DLLs from <QtDir>/bin on your development machine to the installation folder on the client machine (the folder where the executable is stored)
  3. If the executable is build using a Microsoft compiler you might also need to install the redistributable files for that compiler on the client machine (run vcredist_x86.exe for 32-bit Windows or vcredist_x64.exe for 64-bit Windows)
  4. If the executable is build using the MinGW compiler you must install MinGW on your development machine (can be done using the Qt online installers), then you copy the required DLLs from <MinGWDir>/bin to the installation folder on the client machine.



注意:分发可执行文件时,建议分发发行版本而不是调试版本。


Note: When distributing executables, it is recommended to distribute the release version and not the debug version.


这篇关于没有Qt,Qt应用程序没有运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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