S5R2 curses(3X)/malloc(3X) problem

M.LAI gdsd1 at homxb.UUCP
Sat Apr 27 01:47:25 AEST 1985



SYMPTOM:
$ cc t.c -lcurses -lmalloc
ld: Symbol calloc in /lib/libc.a is multiply defined. First defined in /usr/lib/libmalloc.a
ld fatal: Error(s). No output written to a.out

DESCRIPTION:
Curses references cfree() which is defined along with calloc
in libc.a but *not* in the new libmalloc.a.  Cfree() is not advertised
in S5 or S3 (K&R p. 157) so it must have been put in libc.a for
backwards compatability.

SOLUTION:
Define your own cfree(), don't use libcurses.a and libmalloc.a together,
or add cfree() to /usr/lib/libmalloc.a.

--
				Neal Nuckolls
				AT&T Bell Laboratories
				Red Hill, Middletown, NJ
				..!{houxa|vax135}!homxb!gdsd1
				(201) 949-9295



More information about the Net.bugs.usg mailing list