Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Runtime error for QT application?

Tags:

windows

qt

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?

like image 239
Prajosh Premdas Avatar asked Aug 21 '13 15:08

Prajosh Premdas


2 Answers

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!

like image 68
Prajosh Premdas Avatar answered Oct 06 '22 06:10

Prajosh Premdas


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)

like image 23
trandatnh Avatar answered Oct 06 '22 06:10

trandatnh