Question : This application has requested the runtime to terminate it in an unusual way

I'm getting this error when I'm trying to run my application without the debugger. The Microsoft help site says this:

This problem may occur when you use the /GR and the /MD compiler switches, and the version of the Msvcrt.dll file and of the Msvcirt.dll file is 7.0.x.


There is a hotfix for Windows XP but there's no solution for anything else (I use Windows 7). Also, I can't just ship a hotfix along with it.
I don't really know much about compiler switches, how do I compile this program and have this error go away?

I'm using Visual Studio 2008, this is my command line:

1:
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /nologo /c /ZI /TP /errorReport:prompt



Thanks in advance.

Answer : This application has requested the runtime to terminate it in an unusual way

Since you mention explicitly "when I'm trying to run my application without the debugger" the reason is most likely an uninitialized variable, since when running under the VS debugger, all variables are explicitly initialized. I'd start double checking that.
Random Solutions  
 
programming4us programming4us