Exe文件没有QtCreator就不能运行

[英]Exe file does not run without QtCreator


I installed Qt 5.0.1 for Windows 32-bit (MinGW 4.7, 823 MB)

我为Windows 32位(MinGW 4.7, 823 MB)安装了Qt 5.0.1

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:

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

  1. Qt5Core.dll
  2. Qt5Core.dll
  3. icuin49.dll
  4. icuin49.dll
  5. libgcc_s_sjlj-1.dll
  6. libgcc_s_sjlj - 1. - dll
  7. libwinpthread-1.dll
  8. libwinpthread - 1. - dll
  9. libGLESv2.dll
  10. libGLESv2.dll
  11. libstdc++-6.dll
  12. libstdc + + -6. dll
  13. qminimal.dll
  14. qminimal.dll
  15. Qt5Gui.dll
  16. Qt5Gui.dll
  17. Qt5Network.dll
  18. Qt5Network.dll
  19. Qt5Qml.dll
  20. Qt5Qml.dll
  21. Qt5Quick.dll
  22. Qt5Quick.dll
  23. Qt5V8.dll
  24. Qt5V8.dll
  25. qwindows.dll
  26. qwindows.dll

And then I get error:

然后我得到误差:

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

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

Translate:

翻译:

The procedure entry point _ZN6icu_4910CharString15getAppendBufferEiiRiR10UErrorCode not found in library DLL icuuc49.dll

过程入口点_ZN6icu_4910CharString15getAppendBufferEiiRiR10UErrorCode没有在库DLL icuuc49.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\5.0.1\mingw47_32\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.

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

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

要做什么吗?将程序运行在何处和使用哪些库?

Solved. The final list of libraries from C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin:

解决了。C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin:

  1. icuin49.dll
  2. icuin49.dll
  3. icuuc49.dll
  4. icuuc49.dll
  5. libEGL.dll
  6. libEGL.dll
  7. libgcc_s_sjlj-1.dll
  8. libgcc_s_sjlj - 1. - dll
  9. libGLESv2.dll
  10. libGLESv2.dll
  11. libstdc++-6.dll
  12. libstdc + + -6. dll
  13. libwinpthread-1.dll
  14. libwinpthread - 1. - dll
  15. Qt5Core.dll
  16. Qt5Core.dll
  17. Qt5Gui.dll
  18. Qt5Gui.dll
  19. Qt5Network.dll
  20. Qt5Network.dll
  21. Qt5Qml.dll
  22. Qt5Qml.dll
  23. Qt5Quick.dll
  24. Qt5Quick.dll
  25. Qt5V8.dll
  26. Qt5V8.dll

And I forgot to add the folder with qml files.

我忘了添加qml文件的文件夹。

3 个解决方案

#1


16  

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.

将可执行文件放在一个中立的目录中,就像刚刚创建的桌面目录一样。然后运行依赖沃克。它将向您显示缺失库的列表。首先Qt5Core。dll,libgcc_s_sjlj-1。dll和您指定的一个将是缺失的一个。您必须在系统上找到它们,并将它们逐个复制到此目录。大部分丢失的会在您指定的目录中(C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin)。如果你找不到其他人,用列表编辑问题。

Note:

Types of missing files in the General case :

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

  • Qt libraries. If Qt was compiled as static, they should not appear
  • Qt库。如果Qt编译为静态的,则不应该出现
  • Misc libraries Qt depends on : OpenSSL for example. Not appearing if both Qt and this lib is static
  • Misc库Qt依赖于:例如:OpenSSL。如果Qt和这个lib都是静态的,就不会出现。
  • 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.
  • 编译器库:ex, gcc libgcc_s_sjlj,它们通常是动态的,如果不在库搜索路径中,则需要被复制。

#2


-1  

Add "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin" to your path. Then the application should work.

添加“C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin”到你的路径中。然后应用程序应该可以工作。

#3


-2  

Dont worry about the missing dll files. put your .exe file into the folder of this path : "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin"

不要担心丢失的dll文件。将你的.exe文件放入此路径的文件夹:“C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin”

you can run the .exe file now . it works fine.

现在可以运行.exe文件。它将正常工作。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2013/02/05/a721052b4f645876cd52d0c7e18aa4c5.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号