| www.delorie.com/djgpp/bugs/show.cgi | search |
The following program produces the error:
/* Start : test.cc */
#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 : test.cc */
Compiled with: gcc -o test.exe test.cc
Produces: L:\TEMP\ccgdWRwv.o(.text+0x5b):test.cc: undefined reference to
`set_new_handler(void (*)(void))'
Thanks for having a look see.
Regards,
- SolarynAddendum 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. Regards, - Solaryn
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2010 by DJ Delorie | Updated Jul 2010 |