When using _set_abort_behavior, linker emit error : undefined reference to `_imp___set_abort_behavior'
OS Windows XP 32 bits
gcc version 4.7.0 (GCC)
GNU gdb (GDB) 7.4.50.20120410
GNU ld (GNU Binutils) 2.22.52.20120408
GNU windres (GNU Binutils) 2.22.52.20120408
GNU dlltool (GNU Binutils) 2.22.52.20120408
GNU Make 3.82
mingw 3.20
ws32api 3.17
Sample program :
#include <stdlib.h>
#include <iostream>
int main()
{
_set_abort_behavior( 0, _CALL_REPORTFAULT);
return 0;
}
This is only supported with MSVCRT >+ 8.0
gcc -o sample sample.c -D__MSVCRT_VERSION__=0x800 -lmsvcr80