Bug 000328

When Created: 11/03/2000 01:36:01
Against DJGPP version: 2.03
By whom:
Abstract: Undefined reference to set_new_handler (void (*) (void))
The following program produces the error:

/* Start : */

#include <stdio.h>
#include <stdlib.h>
#include <new.h>

void MemHandler (void) {
  printf ("Error: Out of memory!\n");
  exit (-1);

int main (void) {
  set_new_handler (MemHandler);
  return (0);

/* End   : */

Compiled with: gcc -o test.exe
Produces: L:\TEMP\ccgdWRwv.o(.text+0x5b) undefined reference to
          `set_new_handler(void (*)(void))'

Thanks for having a look see.

 - Solaryn

Note added: 11/03/2000 16:27:27
By whom:
Addendum to the above.

Apparently I had it wrong, I forgot to link with GPP, rather than GCC.  Thus the
error is in my usage of the compiler.  Sorry for the inconvenience.

 - Solaryn

Closed on 11/03/2000 16:31:13: Usage error, not a DJGPP bug.
By whom:

  webmaster     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010