I get this:
gcc ae.c -o ae
/tmp/ccu0o440.o: In function `main':
/tmp/ccu0o440.o(.text+0x37): undefined reference to `atexit'
collect2: ld returned 1 exit status
with my test program. A similar test using on_exit works as
My stdlib.h has:
/* Register a function to be called when `exit' is called. */
extern int atexit __P ((void (*__func) (void)));
Which appears to be a declaration for atexit, but there doesn't seem
to be any definition happening with the versions of the library that
I've found recently.
"Eric G. Miller" <firstname.lastname@example.org> writes:
> What makes you think it's not in libc6? The "atexit" function is
> declared in stdlib.h.
- From: Derek L Davies <email@example.com>
- Re: atexit
- From: "Eric G. Miller" <firstname.lastname@example.org>