Vs2010 can not run the file in compiled mode, but runs correctly in debug mode


Recently I'm writing a program using Qt in Visual Studio 2010. I have configured my Qt settings properly because I ran that program successfully before. But now I can't run the program in compiled mode (outside the IDE), but it runs properly in debug mode.

My operating system is Windows 7, and I am using Qt 4.7

PS. It does not say missing DLLs, just crashes silently....

If it executes in release mode but crashes it may not be anything to do with Qt.

Possibilities - you have different environments set in debug/release modes. Are you running this from the commandline in the Debug\Release directories or from ctrl-f5 inside MSVC? So one version may be finding the wrong set of dlls, perhaps an earlier version?

Or more likley, there is a bug in your code that only shows up in release mode. The most common is an uninitialized variable, debug mode generally sets all variables to zero while in release mode they can contain any random value.