All,
  I'm trying to get an executable compiled up on an 11i machine. It
has a few different archive library dependencies as well as shared
library dependencies. The main problem is that there is one particular
library (libtar) that the linker is not properly resolving symbols for.
No matter where I put the libtar.a line in the compile line I get an
"Unsatisfied Symbols" error from the linker. I have tried several
different versions of this archive, one delivered as a binary depot and
others that I have compiled myself. No matter how I cut it, the linker
won't resolved the symbols. My compile line is:

/usr/local/bin/g++ -Wall -O2 -I/usr/local/include -I/opt/libtar/include
-L/usr/local/lib -L/usr/lib anyoption/anyoption.cpp md5/md5.cpp
inifile/inifile.cpp nfs-less.cpp /usr/local/lib/libcurl.a
/usr/local/lib/libssl.a /usr/local/lib/libidn.a
/usr/local/lib/libiconv.a /usr/local/lib/libcrypto.a
/usr/local/lib/libz.a /var/sw/libtar-1.2.11/lib/libtar.a
/usr/lib/libnsl.a -v -o nfs-less

After which, when executed, I receive the following output (with linker
line):

/usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/collect2
-L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -u __gcc_plt_call -o isodx
/usr/ccs/lib/crt0.o /lib/unix98.o -L/usr/local/lib -L/usr/lib
-L/usr/local/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.1 -L/usr/ccs/lib
-L/usr/local/lib /var/tmp//cc06IoOa.o /var/tmp//ccJOQPXa.o
/var/tmp//ccDkREga.o /var/tmp//ccHgOOyd.o /usr/local/lib/libcurl.a
/usr/local/lib/libssl.a /usr/local/lib/libidn.a
/usr/local/lib/libiconv.a /usr/local/lib/libcrypto.a
/usr/local/lib/libz.a /var/sw/libtar-1.2.11/lib/libtar.a
/usr/lib/libnsl.a -lstdc++ -lm -lgcc -lc -lgcc
/usr/ccs/bin/ld: Unsatisfied symbols:
  tar_close(TAR*)   (first referenced in /var/tmp//ccHgOOyd.o) (code)
  tar_extract_all(TAR*, char*)(first referenced in
/var/tmp//ccHgOOyd.o) (code)
  tar_append_tree(TAR*, char*, char*)(first referenced in
/var/tmp//ccHgOOyd.o) (code)
  tar_open(TAR**, char*, tartype_t*, int, int, int)(first referenced
in /var/tmp//ccHgOOyd.o) (code)
collect2: ld returned 1 exit status

As you might have guessed the tar_close, tar_open, etc are exported in
the libtar.a archive.
objdump -t /var/sw/libtar-1.2.11/lib/libtar.a:
...
00000000 l       $CODE$ $CODE$
00000000       F *UND*  tar_dev_free
00000000       F *UND*  dev_hash
00000000 g     F $CODE$ tar_open
00000000 g     F $CODE$ tar_fd
00000000       F *UND*  close
00000000       F *UND*  write
...

You can see almost the exact same output for each of the "unsatisfied"
symbols as you see above.

If anybody can give me any insight into how I might make the linker see
these symbols, I would be greatly appreciative.

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to