I\'m trying to use threads on a Windows C program, compiled on an Eclipse environment and Mingw.
I\'ve also put -lpthread and -pthread on the compilation command, and in
"This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
To solve this have look on this.
Or
When abort()
function is getting called from your application you will see that error.
From MSDN:
abort
Aborts the current process and returns an error code.
void abort( void ); Return Value
abort does not return control to the calling process. By default, it terminates the current process and returns an exit code of 3.
Remarks
By default, the abort routine prints the message:
"This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
But in your case you need to find why abort()
is getting called .
Solved!
AFAIK there is no portable pthread library for Windows under Mingw.
I solved my problem using CreateThread(), and let Mingw resolves it using Windows native threads.