public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs 1.1.1: apparently multiple library inclusion??
@ 1998-12-22 10:42 Lorens Kockum
  1998-12-29  3:21 ` Please, a word of help (Was: Re: egcs 1.1.1: apparently multiple library inclusion??) Lorens Kockum
  0 siblings, 1 reply; 4+ messages in thread
From: Lorens Kockum @ 1998-12-22 10:42 UTC (permalink / raw)
  To: egcs

Hi, I just installed egcs for evaluation, and I have a bit of a
problem during linking.

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 *, 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
% ./display_npl.o: In function `operator new [](unsigned int, void *)':
% /usr/lib/gcc-lib/i486-linux/egcs-2.91.60/include/new:43: multiple definition of `operator new [](unsigned int, void *)'
% ./main.o:/usr/lib/gcc-lib/i486-linux/egcs-2.91.60/include/new:43: first defined here
% ./display_npl.o: In function `ios::init(streambuf *, ostream *)':
% /usr/include/g++-2/streambuf.h:469: multiple definition of `ios::init(streambuf *, ostream *)'
% ./main.o:/usr/include/g++-2/streambuf.h:469: 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?

How do I correct that?


FWIW, the errors get even funnier; using a different machine,
system and egcs installed by a different person, AFAICS
according to the recommendations in the egcs documentation:

	su - sysop
	cd /home/sysop/egcs-compile
	../egcs-untar/configure --prefix=/usr/local/egcs
	make
	make install
	logout
	export PATH=/usr/local/egcs/bin:$PATH
	cd project_sources
        ./configure
	make

I have one definition in a .h that is in the compilation
directories /home/sysop/egcs-compile, which are unreadable
for the user doing the compile, and the other in
/usr/local/egcs/whatever.  I suppose that means that a library
is generated during egcs compilation, and that library is put in
/usr/local/egcs, and that I somehow contrive to include both?

Anyway, if someone could point me in the right direction, I'd be
very happy, I'm going in circles here.  More info upon request.

-- 
#include <std_disclaim.h>                          Lorens Kockum

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-01-31 23:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-22 10:42 egcs 1.1.1: apparently multiple library inclusion?? Lorens Kockum
1998-12-29  3:21 ` Please, a word of help (Was: Re: egcs 1.1.1: apparently multiple library inclusion??) Lorens Kockum
1999-01-31 23:58   ` Chip Salzenberg
1999-01-31 23:58     ` Lorens Kockum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).