This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Undefined reference to atexit (FAQ).
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: Undefined reference to atexit (FAQ).
- From: Tiago de Paula Peixoto <tpeixoto at if dot usp dot br>
- Date: Thu, 25 Oct 2001 13:50:30 -0200
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
Hello.
When I try to compile a simple program such as
#include "confdefs.h"
#include <openssl/opensslv.h>
int main() {
return OPENSSL_VERSION_NUMBER;
; return 0; }
I get the following error:
gcc -o test test.c -lssl -lcrypto
/lib/libdl.so.2: undefined reference to `atexit'
collect2: ld returned 1 exit status
I know this is a FAQ and all, but libc_nonshared.a is in the right place
and I don't know why the linker isn't getting to it.
/usr/lib/libc.so reads:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
I'm using glibc-2.2.4, compiled with gcc-2.95.3.
Can anyone help ?
Thanks.
--
Tiago
PGP signature