This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: error in loading rpm compiled with gcc 4.5
Preeti Sharma <pritis@gmail.com> writes:
> I compiled our application with gcc 4.5 and now when I load the rpm I
> get the following error:
>
> error: Failed dependencies:
> libstdc++.so.6(GLIBCXX_3.4.14) is needed by ........
>
> It was using gcc 4.1 before.
>
> Any pointers on what path/links need to be fixed to get over this.
The dynamic linker needs to pick up the same libstdc++.so that the
regular saw when it linked your program. Well, it doesn't have to be
the exact same one, but it needs to be from the same or a newer version
of gcc. In this case you are getting the libstdc++.so from an older
version of gcc, presumably the one installed on your system. You need
to use the LD_LIBRARY_PATH environment variable or modify ld.so.config
to pick up the newer one instead.
Or you need to build libstdc++ statically, or link against it
statically.
Ian