This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

jartool.c:539: undefined reference to `strdup'


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)


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