[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: atexit

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" <egm2@jps.net> writes:

> What makes you think it's not in libc6? The "atexit" function is
> declared in stdlib.h.


Reply to: