jartool.c:539: undefined reference to `strdup'
John David Anglin
dave@hiauly1.hia.nrc.ca
Thu May 3 09:16:00 GMT 2001
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)
More information about the Gcc-bugs
mailing list