From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chip Salzenberg To: Lorens Kockum Cc: egcs@egcs.cygnus.com Subject: Re: Please, a word of help (Was: Re: egcs 1.1.1: apparently multiple library inclusion??) Date: Sun, 31 Jan 1999 23:58:00 -0000 Message-id: <19990102200527.E557@perlsupport.com> References: <19981222194228.F3581@bigears.solsoft.fr> <19981229112121.32484.qmail@bigears.solsoft.com> X-SW-Source: 1999-01n/msg00054.html According to Lorens Kockum: > >At first, compiling my existing C and C++ code, no problems. > >Then I spent two days adding in STL lists, compiling the object > >files as I went, with (finally, at least ;-)) no errors. (No, I > >did not forget the make clean...) > > > >The first errors that come out of the linker are: > >% ./display_npl.o: In function `int lexicographical_compare_3way(signed char const *, signed char const *, signed > >char const *, signed char const *)': > >% /usr/include/g++-2/stl_algobase.h(.text+0x0): multiple definition of `operator new(unsigned int, void *)' > >% ./main.o(.text+0x0):/usr/include/g++-2/stl_algobase.h: first defined here > >I don't get it. Does this mean that the offending definitions, > >the ones that can not be made multiple times, are made and > >included in each object file? Yes. Your EGCS apparently believes that it has a GNU linker to depend on; GNU ld will omit the duplicate definitions. It may even be a generic ELF feature, I don't know. -- Chip Salzenberg - a.k.a. - "When do you work?" "Whenever I'm not busy."