This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++] Relocation error on i686 when using lists on g++ 3.4.0

Asfand Yar Qazi <> writes:

> Hi,
> When running a g++ program on i686 that uses lists, I get the
> following error:
> relocation error: ./test/test_game: symbol
> _ZNSt15_List_node_base4hookEPS_, version GLIBCXX_3.4 not defined in
> file with link time reference

My first guess is that your runtime  linker (see 'man') is
    finding the wrong .

The gcc 3.4 pre-releases, gcc 3.4.0, and mainline snapshots of gcc 3.5
    all build a shared library called ''. They are
    intended to be compatible, but bugs do creep in.

$ ldd ./test/test_game

should tell you which is being found at runtime. If it
    doesn't match the version of gcc you compiled with, you need to
    muck with your LD_LIBRARY_PATH, or with ldconfig until it does.

You'll need to read the man pages for, and for ldconfig.

> GCC 3.4.0 was configured with:
> ../gcc-3.4.0/configure --prefix=/opt/gcc
> --enable-version-specific-runtime-libs --enable-__cxa_atexit
> and compiled with:
> make profiledbootstrap
> glibc version 2.2.5
> binutils version 2.14
> Its funny, because a pre-release CVS version of G++ 3.4.0 works fine.

Probably you have your ldconfig or LD_LIBRARY_PATH configured to find
    the that came with the pre-release CVS version.

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