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: gcc-3.0 pre and mem_fun()


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


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