8
votes

I have developed an application on Qt5.1 for windows 7 and now I want to distribute it. Since I have used the MINGW compiler I cannot build it static. I used dependency walker to find out all the dlls and packaged it. When I run the application on a machine which doesnot have QT development environment installed the application crashes with Microsoft Visual C++ Runtime Library error.

Could anybody please point me out the problem?

2
Can you please provide more information about error? - SpongeBobFan
I get an error which read Microsoft Visual C++ Runtime Library. This program has requested runtime to terminate it in an unusual way - Prajosh Premdas
I encounter this problem when QVector at index of range.Mingw have not show the error in the error Dialog And MSVC have. And Mingw have not locate the error line of code just emit a Runtime error Dialog with no detail msg. - Crawl.W

2 Answers

11
votes

The error was

enter image description here

Fixed the problem:

The fix is add a folder platform into the location of your application executable and into that copy qwindows.dll from the loaction 5.1.0-rc2\mingw48_32\plugins\platforms of your QT installation.

Also all the dlls need to be copied!

2
votes

It seems like you have missed some DLLs. Try again with dependency walker, I have faced the same issue once. The dependency walker did not show missing DLLs but some were missing. Try to search in SO, there are similar questions.

Do I have to include all these Qt dlls with my application?

How to run Qt 5 applications on other computers (Windows 7)