Re: undefined reference to `atexit'
On Mon, Apr 16, 2001 at 09:17:13PM +0100, Oliver Elphick wrote:
| Can anyone offer a solution for this:
|
| gcc -pipe -L /home/olly/mypackages/eiflibs/eifpgsql/C -L
| /home/olly/mypackages/eiflibs/datetime/C edbgen1.o edbgen2.o edbgen3.o
| edbgen4.o -lgdk -lgtk -leifutils -leifpq -lpq
| /usr/lib/libcrypto.so.0.9.6: undefined reference to `atexit'
| collect2: ld returned 1 exit status
|
| But if I compile a very small program that calls atexit() directly, it has
| no problem finding it, even though I specify no library at all.
| As far as I can see, atexit() is part of libc6.
The prototype is defined in stdlib.h. The definition should be in
libc.so
Can you try adding -lc to the gcc command line?
|
| ========================================
| "But seek ye first the kingdom of God, and his
| righteousness; and all these things shall be added
| unto you." Matthew 6:33
-D
Reply to: