This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Undefined reference to atexit (FAQ).



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]