From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a9d98024aa8b2cc6,start X-Google-Attributes: gidfee84,public From: "Dave Maclaurin" Subject: C compile-runtime problem Date: 1999/08/06 Message-ID: <933914694.747913@parmaite.otago.ac.nz>#1/1 X-Deja-AN: 509463011 Cache-Post-Path: parmaite.otago.ac.nz!unknown@redshift.otago.ac.nz Organization: University of Otago X-MSMail-Priority: Normal X-Priority: 3 X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Newsgroups: comp.unix.osf.osf1 Hi, I'm trying to compile and run one of the examples from the Netscape C SDK LDAP installation under Digital Unix 4. I'm relatively new to unix and don't know why the code compiles, links then dies at run time. I am obviously not linking in all the required shared libraries - how can I work backwards from a runtime error for an unresolved symbol to a library that needs to be loaded at runtime. Any help appreciated Cheers Dave. See below for the log of what I'm doing. Compile the Netscape example >cc -taso -rpath /lib asearch.c -c Then Link it >ld -taso -v -call_shared asearch.o lib/libldapssl30.so /usr/shlib/libc.so After processing 'stdin' arg list is: ld -taso -v -call_shared asearch.o lib/libldapssl30.so /usr/shlib/libc.so Expanded arg list is: ld -taso -v -call_shared asearch.o lib/libldapssl30.so /usr/shlib/libc.so ld: Pass 1 Opened file asearch.o asearch.o: Object file, rev: 3.13 ld: asearch.o: version stamp: 3.13, does not match ld's: 3.11 Opened file lib/libldapssl30.so lib/libldapssl30.so: Shared object, rev: 3.11 Opened file /usr/shlib/libc.so /usr/shlib/libc.so: Shared object, rev: 3.11 Trying to open file /usr/shlib/libexc_init.so Trying to open file /usr/ccs/lib/libexc_init.so Trying to open file /usr/lib/cmplrs/cc//libexc_init.so Trying to open file /usr/lib/libexc_init.so Trying to open file /usr/local/lib/libexc_init.so Trying to open file /var/shlib/libexc_init.so Trying to open file /usr/shlib/libexc_init.a Trying to open file /usr/ccs/lib/libexc_init.a Trying to open file /usr/lib/cmplrs/cc//libexc_init.a Opened file /usr/lib/cmplrs/cc//libexc_init.a Using archive /usr/lib/cmplrs/cc//libexc_init.a for -lexc_init /usr/lib/cmplrs/cc//libexc_init.a(call.o): Compressed Object in archive file, rev: 3.13 /usr/lib/cmplrs/cc//libexc_init.a(call.o): version stamp: 3.13, does not match l d's: 3.11 ld: Pass 2 asearch.o: /usr/lib/cmplrs/cc//libexc_init.a(call.o): > Then Try to Run > a.out 28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libc.so: __ldr _data 28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libc.so: __Arg c 28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libc.so: __Arg v 28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libpthread.so: __Argc 28745:a.out: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libpthread.so: __Argv 28745:a.out: /sbin/loader: Fatal Error: this executable has unresolvable symbols