March 3, 2013

matterwave matterwave
Lab Rat
2 posts

[SOLVED] Qt5 on Win8 64bit: Library Deployment

 

—- The issue has been resolved, see the post below.

Hello,

I’ve recently installed Qt 5.0.1 on my Windows8 ×64 system using mingw 4.7 (32bit).
Further I created a new simple GUI project. The app runs perfectly withing the IDE.

My aim is it to make the app run on other machines where Qt5 is not installed.

Since I link dynamically I need to deploy certain dlls the program requires when I try to run it outside of the IDE:

  • Qt5***.dll, libwinpthread-1.dll, libstdc++-6.dll, libgcc_s_sjlj-1.dll, icuin49.dll
    I copied them from
  • C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin

This could not be the solution as I now encountered the 0xc00007b error.
(Which means that there’s something wrong with the libraries. Either 32bit and 64bit libs are mixed, one may not be found or currupt etc.)

Using the ProcessExplorer from the SysInternal Suite I figured out I need all of the following libraries:

  • qwindows.dll
  • Q5Widgets.dll
  • Qt5Gui.dll
  • Qt5Core.dll
  • libwinpthread-1.dll
  • libstdc++-6.dll
  • libGLESv2.dll
  • libgcc_s_sjlj-1.dll
  • libEGL.dll
  • icuuc49.dll
  • icuin49.dll
  • icudt49.dll

which are 12 in count or 37MB in size for a simple GUI application with a form.
But now it runs on my system at least – without editing the windows PATH variable.

Does it now run on other Windows systems? The answer is no.
On another Win7 ×64 system the program now claimed that it’s missing the D3DCOMPILER_43.dll.
But when I deployed it, I got an runtime error:
“MS C++ Runtime Error: This application has requested the Runtime to terminate it in an unusual way. Please contact the application support team for more information.”

Conclusion
It’s not absolutely clear which libraries I have to deploy together with my program.
Further 37MB additional libraries for a simple GUI that does nothing is huge in my opinion.

As my last point I’d liked to mention that I haven’t worked with Qt4 before. But I looked up what Stellarium or avidemuxer deploy:
Those are at least Qt**.dll, libstdc++-6.dll and libwinpthread-1.dll
So in total less libraries.

Question

  • Do I really have to deploy all of these libraries? How are your experiences?
  • How to deal with this problem about the D3DCOMPILER_43.dll?
  • Do you need any additional information?

Best Greetings

 Signature 

May the Force be with you! Always.

1 reply

March 4, 2013

matterwave matterwave
Lab Rat
2 posts

I finallly found a wonderful documentation that indeed answers most of my questions:
http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html

I will work on with these new information and hopefully be able to run my application on other machines soon.

Edit:

I’d like to announce that I solved my problem by now.
One important thing was to place the “qwindows.dll” in a subdirectory named “platforms”.

 Signature 

May the Force be with you! Always.

 
  ‹‹ Why does macdeployqt create a frameworks dir..      Error when cross compiling Qt 5.0.1 for the Raspberry Pi ››

You must log in to post a reply. Not a member yet? Register here!