Qt 5.0.1: application will not run outside of Qt creator

I am trying to run the TransitTalker.exe program which is my compiled code from qt as shown in the picture:

https://www.dropbox.com/s/ypgklrm4uschri5/filecontents.png

(Please note that I do not have enough reputation to submit images, so I provided a link to the image)

My problem:

  • My program is not executing outside of qt creator.

  • I receive the following message when I try to start TransitTalker.exe: "This application asked Runtime to terminate it in an unusual way. Please contact support for more information."

What I have already done:

  • I have added the required dll (except GPSVC.dll and IESHIMS.dll). I found the required DLL through a program called dependent walker.

  • I made sure my program runs inside qt creator without error.

My main question is: Why am I getting this message at runtime: "This application asked the Runtime to terminate it in an unusual way. For more information, please contact application support." I want to be able to run my TransitTalker.exe program as a standalone qt application.

Launching qt creator 5.0.1 (MINGW 47_32). I have Visual Studio 2012 on the same computer.

+3


source to share


3 answers


I got my app to work now. See the solution below for how I did it.

Dmitry is right that MinGW GCC 4.7 is not compatible with Qt 5.0.1, which I checked through this post



My solution . I have installed Qt Creator 4.8 SDK which uses MinGW GCC 4.4. I was able to run the application executable outside of Qt Creator.

+1


source


I know this is marked as solved, but I had the same problem and solved it by copying libEGL.dll

from the Qt binaries directory. for some odd reason it didn't show up in the dependency check, I had to go through a long debug log to see which libraries were actually loaded. (and it's not in your image, so it's most likely the same problem)



+4


source


My guess is that Qt has some kind of failure to start at boot (eg in the QApplication constructor) and prints a message to stdout (or stderr?) And then err, "terminates the application in an unusual way".

If this happens, then you will want to know what the error message says about it. One way to do this is to temporarily add the following code to the top of main ():

AllocConsole();
freopen("conin$",  "r", stdin);
freopen("conout$", "w", stdout);
freopen("conout$", "w", stderr);

      

... then recompile your program and run it again. When it starts up, an MS-DOS shell window appears, watch it for any informational messages about why Qt is unhappy.

0


source







All Articles