没有 QtCreator,exe 文件无法运行 [英] Exe file does not run without QtCreator

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

问题描述

我安装了 Qt 5.0.1 for Windows 32-bit (MinGW 4.7, 823 MB)

然后我创建了简单的 Quick 2 应用程序并编译了它.应用程序位于其文件夹中,应用程序从 QtCreator 运行.我想在没有 QtCreator 的情况下运行这个 exe 文件.为此,我从 C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin 复制文件:

Then I created simple Quick 2 application and compiled it. Application is located in the its folder, and apllication run from QtCreator. And I want to run this exe file without QtCreator. To do this, I copy the files from the C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin:

  1. Qt5Core.dll
  2. icuin49.dll
  3. libgcc_s_sjlj-1.dll
  4. libwinpthread-1.dll
  5. libGLESv2.dll
  6. libstdc++-6.dll
  7. qminimal.dll
  8. Qt5Gui.dll
  9. Qt5Network.dll
  10. Qt5Qml.dll
  11. Qt5Quick.dll
  12. Qt5V8.dll
  13. qwindows.dll

然后我得到错误:

Точка входа в процедуру _ZN6icu_4910CharString15getAppendBufferEiiRiR10UErrorCode не найдена в библиотеке DLL icuuc49.dll

翻译:

在库 DLL icuuc49.dll 中找不到过程入口点 _ZN6icu_4910CharString15getAppendBufferEiiRiR10UErrorCode

如果我将 exe 文件复制到文件夹 C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin(所有 dll 在哪里),程序运行,但没有显示.

If I copy the exe file to a folder C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin (where are all the dll), the program runs, but nothing shows.

如果我将exe文件复制到文件夹C:\Qt\Qt5.0.1\Tools\QtCreator\bin(所有dll在哪里),程序不会运行.

If I copy the exe file to a folder C:\Qt\Qt5.0.1\Tools\QtCreator\bin (where are all the dll), the program does not run.

怎么办?将程序运行在何处以及使用哪些库?

What to do? Where and what libraries to take the program to run?

已解决.来自C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin的库的最终列表:

  1. icuin49.dll
  2. icuuc49.dll
  3. libEGL.dll
  4. libgcc_s_sjlj-1.dll
  5. libGLESv2.dll
  6. libstdc++-6.dll
  7. libwinpthread-1.dll
  8. Qt5Core.dll
  9. Qt5Gui.dll
  10. Qt5Network.dll
  11. Qt5Qml.dll
  12. Qt5Quick.dll
  13. Qt5V8.dll

我忘记添加包含 qml 文件的文件夹了.

And I forgot to add the folder with qml files.

推荐答案

将您的可执行文件放在一个中性目录中,就像一个新创建的桌面一样.然后运行 ​​dependency walker.它将显示缺少的库列表.对于一开始 Qt5Core.dlllibgcc_s_sjlj-1.dll 和您指定的将是缺失之一.你必须在你的系统上找到它们,并一一复制到这个目录中.大多数丢失的将在您指定的目录中(C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin).如果您找不到其他人,请使用列表编辑问题.

Put your executable in a neutral directory, like a freshly created one your desktop. Then run dependency walker. It will show you the list of missing libraries. For a start Qt5Core.dll, libgcc_s_sjlj-1.dll and the one you specified will be one of the missing. You have to find them on your system, and copy one by one to this directory. Most of the missing will be in the directory you specified (C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin). If you cannot find the other ones edit the question with a list.

注意:

一般情况下丢失文件的类型:

Note:

Types of missing files in the General case :

  • Qt 库.如果 Qt 被编译为静态,它们不应该出现
  • 其他库 Qt 依赖于:例如 OpenSSL.如果 Qt 和此库都是静态的,则不会出现
  • 编译器库:例如,用于 OP 的 gcc libgcc_s_sjlj.它们通常是动态的,如果它们不在库搜索路径中,则需要进行复制.
  • Qt libraries. If Qt was compiled as static, they should not appear
  • Misc libraries Qt depends on : OpenSSL for example. Not appearing if both Qt and this lib is static
  • Compiler libraries : ex, gcc libgcc_s_sjlj for the OP. They are usually dynamic and need to be copied if they are not already in the library search path.

这篇关于没有 QtCreator,exe 文件无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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