This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: gcc-3.0 pre and mem_fun()
- To: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Subject: Re: gcc-3.0 pre and mem_fun()
- From: "R. Sinoradzki" <sinoradz at student dot uni-kl dot de>
- Date: Mon, 28 May 2001 00:52:47 +0200
- References: <3B10ED5A.CB994DD5@student.uni-kl.de>
Hi,
I forgot to post my configuration:
bash-2.05$ gcc-3.0 -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../../src/gcc/gcc/configure --enable-languages=c,c++
--infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as
--with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-x
--without-included-gettext --disable-checking --enable-threads=posix
--enable-version-specific-runtime-libs
--disable-libgcj : (reconfigured) ../../src/gcc/gcc/configure
--enable-languages=c,c++ --infodir=/share/info --mandir=/share/man
--enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib
--enable-long-long --enable-nls --without-x --without-included-gettext
--disable-checking --enable-threads=posix --enable-version-specific-runtime-libs
--disable-libgcj
Thread model: posix
gcc version 3.0 20010526 (prerelease)
I don't know how to get information about my library version/configuration at
the moment. Please tell me ...
bye, Ralf
"R. Sinoradzki" wrote:
>
> Hi,
>
> I tested some code from alt.comp.lang.learn.c-c++
> It compiles and works with gcc-2.95.4.
>
> It also compiles with gcc-3.0pre(cvs-version from yesterday)
> but it does not execute.
>
> the error is:
>
> ./memfun: error while loading shared libraries: ./memfun:
> symbol __register_frame_info_bases, version GCC_3.0 not defined
> in file libgcc_s.so.0 with link time reference
>
> So perhaps this is the wrong place and the problem is within the compiler.
>
> O.K the code:
>
> //////////////////////////////////////////////////////////////////
>
> #include <iostream>
> #include <functional>
> #include <algorithm>
> #include <list>
>
> using namespace std;
>
> class Base {
> public:
> virtual void set() { cout << "Base::set()" << endl; }
> };
>
> class Derived : public Base {
> public:
> virtual void set() { cout << "Derived::set()" << endl; }
> };
>
> int main()
> {
> Base* b = new Base;
> Derived* d = new Derived;
>
> list<Base*> lst;
> lst.push_back(b);
> lst.push_back(d);
>
> for_each(lst.begin(), lst.end(), mem_fun(&Base::set));
> }
>
> /////////////////////////////////////////////////////////////////////////
>
> bye, Ralf