Menu

#153 error link _set_abort_behavior

Instruction_given
closed
nobody
5
2014-08-26
2012-06-01
Anonymous
No

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;
}

Discussion

  • Earnie Boyd

    Earnie Boyd - 2012-06-01

    This is only supported with MSVCRT >+ 8.0

    gcc -o sample sample.c -D__MSVCRT_VERSION__=0x800 -lmsvcr80

     
  • Earnie Boyd

    Earnie Boyd - 2012-06-01
    • labels: 104601 --> mingw runtime
    • status: open --> closed
     
  • Earnie Boyd

    Earnie Boyd - 2012-06-01
    • milestone: --> Instruction_given