Search code examples
c++qtqt-creatormingw32

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


Solution

  • 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