This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
jartool.c:539: undefined reference to `strdup'
- To: gcc-bugs at gcc dot gnu dot org
- Subject: jartool.c:539: undefined reference to `strdup'
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 3 May 2001 12:16:24 -0400 (EDT)
The following error occurs building jartool under vavax-dec-ultrix4.3:
gcc -W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -g -O2 -o fastjar jartool.o dostime.o compress.o pushback.o ./../zlib/libz.a -L/../zlib/
jartool.o: In function `get_next_arg':
/xxx/gnu/gcc-3.0/objdir/fastjar/../../fastjar/jartool.c:539: undefined reference to `strdup'
collect2: ld returned 1 exit status
It can be worked around by linking with libiberty.a or adding a version of
strdup to jartool.c.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)