8

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?

Prajosh Premdas
  • 970
  • 4
  • 17
  • 40
  • 2
    Can you please provide more information about error? – SpongeBobFan Aug 21 '13 at 15:07
  • 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 Aug 28 '13 at 12:36
  • 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 Jun 06 '19 at 03:11

2 Answers2

11

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!

Prajosh Premdas
  • 970
  • 4
  • 17
  • 40
2

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)

Community
  • 1
  • 1
trandatnh
  • 351
  • 8
  • 26
  • 2
    Fixed the problem: The fix is add a folder platform and into that copy qwindows.dll 5.1.0-rc2\mingw48_32\plugins\platforms if release build or qwindowsd.dll for debug. Also all the dlls need to be copied – Prajosh Premdas Aug 28 '13 at 12:50
  • Qt5 is getting more convoluted by the minute. –  Aug 28 '13 at 13:53