Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cygwin compiling error: "this application has requested the runtime to terminate it in an unusual way"

I am trying to run Cygwin, and I am running into some problems. I tried to compile a program that works both on Windows with mingw and on a Unix system, but when I go to compile it through Cygwin:

gcc threads.c -o threads

I get the error: this application has requested the runtime to terminate it in an unusual way

And that's it... any ideas what I am forgetting or screwing up? I haven't touched this stuff in about 5 years so I am beyond rusty; thanks!

like image 852
naspinski Avatar asked Dec 09 '22 17:12

naspinski


2 Answers

In my case this problem was caused by the fact I didn't have a TEMP environment variable defined in cygwin, try:

export TEMP=/tmp

If TEMP is already defined make sure the directory is not read only.

like image 110
George Norton Avatar answered May 08 '23 05:05

George Norton


The error message means the compiler crashed while trying to build your program.

Most likely this means your Cygwin installation is corrupt or happens to include a broken version of gcc. Try updating to the current version of Cygwin. This is doubly the case given that Cygwin 1.7 and the first stable releases of GCC 4 are both recent happenings. If you're still on Cygwin 1.5 or GCC 3.x, I think there's an excellent chance that upgrading will fix your symptom.

like image 22
Warren Young Avatar answered May 08 '23 07:05

Warren Young