This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: (help!) problems with gcc/libstdc++


On Sat, May 19, 2001 at 12:28:09PM +0000, chromisx@home.nl wrote:
> /usr/lib/libstdc++.so: undefined reference to
> `std::bad_alloc::~bad_alloc(void)'
> I guess it may be a problem with some header files, perhaps? If so,

no

> {root}(0)[/usr/lib] # ls libstdc++*     
> libstdc++-3-libc6.1-2-2.10.0.a   libstdc++-libc6.1-2.so.3 
> libstdc++.so			 libstdc++-3-libc6.1-2-2.10.0.so 
> libstdc++.a                      libstdc++.so.3
> libstdc++-libc6.1-1.so.2         libstdc++.a.2.10.0       
> libstdc++.so.3.0.0               libstdc++-libc6.1-2.a.3         
> libstdc++.la

Assuming you really made a mess (while problem could be just minor),
I suggest to remove everything without version numbers:
rm libstdc++.so libstdc++.a libstdc++.la

This should result in the linker error: can find -lstdc++
or something like that.

The files with version numbers are only used when *running* a program,
so you might want to keep them or else you might break installed
applications (you can savely remove those that are installed after
you started to try to fix things though).

> I have two directories in my /usr/include directory, ie.
> /usr/include/g++ and /usr/include/g++-v3. The contents of these dirs
> are totally different, though.

The first is used by g++ versions 2.95.x, the latter by 3.x.

> Anyone can give me a hint, a possible solution or a tip?? I hope so,
> since i presume this problem may likely cause problems with other
> packages as well. 

For now, assume that the compiler version and libstdc++ version belong
to eachother: you don't want to mix those.

As of 2.95.x (at least, as far as I know), libstdc++ is part of the gcc
package.  All you need to do is to install 'gcc' (with C++ support) and
everything should be fixed.

> Well, no-one had a solution. I tried to fiddle around myself. After
> some reading and scratching my head now and then, I decided to
> download the newest gcc (2.95.3) and the newest libstdc++. (2.92) i

libstdc++-2.92.2 belongs to gcc-3.x.  That is why this won't work.

> could find past week; i copied the libstdc++ source into the gcc
> source tree, moved the libstdc++ directory, renamed the libstdc++-2.92
> dir to libstdc++, compiled it as usual and installed it...

Look again on the GNU ftp sites where you found gcc-2.95.3, it contains
a tar.gz that contains EVERYTHING, *or* you can choose to download
multiple tar files (a common, a part with C++ support, java,.. fortran etc).
If you just got the common part then you just had a C compiler.  Adding
an arbitrary libstdc++ from somewhere else doesn't work: you should get
the tar gcc-g++.2.95.3.tar.gz or something. That contains the correct
libstdc++.

> - --  # # \ Greetings from Holland!

In which city do you live?

-- 
Carlo Wood <carlo@alinoe.com>


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