Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run my exe file on another computer. "Application requested the runtime to terminate it in an unusual way" error

My exe runs completely fine on the computer I programmed it on. It debugs fine, releases fine, and I can move the exe file from the 'release' folder into a new file, locate the needed .dll files from C:\pathtoqt\ming47_32\bin and it still runs fine. However, when I attempt to run this program on another computer with the .dll files included, I cannot do it and I get the "Application has requested the runtime to terminate it in an unusual way".

I have tested this on 2 windows 7 computers and 1 windows xp. I used dependency walker and downloaded a bunch of .dll's and it still didn't work. I managed to get it to all the dll's to be either "found" status or "red" status.

Build Settings: http://puu.sh/3qTV3.png

I am using Qt5.0.2, mingGW 4.7 32bit.

I also stumbled upon this..http://puu.sh/3qU6j.png

like image 468
throwaway2013 Avatar asked Jun 29 '13 07:06

throwaway2013


2 Answers

More than likely, those computers do not have some required Qt library that your program is using. See the tutorial here: http://doc.qt.io/qt-5/windows-deployment.html

Another easy check would be to install Qt on another computer, move your .exe over and see if it runs. If it does, you certainly did not deploy your application correctly.

Edited to add this helpful link since this seems to be the exact same issue people are seeing: https://bugreports.qt.io/browse/QTBUG-28766

like image 89
It'sPete Avatar answered Sep 28 '22 02:09

It'sPete


If you have cygwin installed then you can run ldd <your_app.exe> and see list of libraries which are required by your application. After doing so copy your exe to another folder and libraries which are required by it.

This should be OK for LGPL license but I AM NOT A LAWYER so please consult some smarter people which are familiar with legal issues.

like image 25
MichK Avatar answered Sep 28 '22 03:09

MichK