简体   繁体   中英

Qt 5.0.1: Application will not execute outside of Qt creator

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

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

(Note that I do not have sufficient reputation to post images, which the reason why I provided a link to the image)

My problem:

  • My program does not execute outside of qt creator.

  • I get the following message attempting to run TransitTalker.exe: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

What have I done already:

  • I have added the required dll's (Except GPSVC.dll and IESHIMS.dll). I found the required dll's thru a program called dependency walker.

  • I made sure my program runs inside qt creator, with no errors.

My main question: Why am I receiving this runtime message: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." . I want to be able to run my program, TransitTalker.exe as an qt standalone application.

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

I know this is marked as solved but I had the same problem and I 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 look through the long debug log to see what libraries actually got loaded. (and it isn't in your image, so it is quite likely the same problem)

I got my application to work now. See solution below on how I did it.

Dmitry is correct that MinGW GCC 4.7 is not compatible with Qt 5.0.1, which I verified thru this post

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

My guess is that Qt is having some kind of startup-time assertion failure (eg in the QApplication constructor) and is printing a message to stdout (or stderr?) and then, err, "terminating the app in an unusual way".

If that's the case, then you'll want to find out what that error message says. One way to do that would be to add the following code temporarily 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 runs, an MS-DOS shell-window should appear, watch it for any informative messages about why Qt is unhappy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM