g++ can't locate iosfwd

Jonathan Wakely jwakely.gcc@gmail.com
Sat Aug 27 14:36:00 GMT 2011

2011/8/27 Maciej Bliziński :
> There are some libraries which haven't changed their SONAMEs since
> gcc-3.x.  For example a compiled gcc-3.4.6 will produce
> libstdc++.so.6, and so wil gcc-4.6.1. The theory is that if the SONAME
> of a shared library doesn't change, applications should be able to
> link against that library at runtime and run fine.  If that's true, I
> should be able to compile and link a binary against libstdc++.so.6
> using gcc.3.4.6, and then replace libstdc++.so.6 with the one built by
> gcc-4.6.1.  Is this in fact possible?

Yes, it should work.


Be aware though that Symbol Versioning was not originally supported on
Solaris but is by recent GCC releases, so if it is enabled when you
build GCC that makes an incompatible libstdc++.so

More information about the Gcc-help mailing list