Re: Version mismatch of shared library libstdc++.so.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Qingning Huo wrote:
On Wed, Apr 16, 2008 at 11:56 PM, Tim Prince
<TimothyPrince@xxxxxxxxxxxxx> wrote:
Qingning Huo wrote:

Hello,

I am having a problem of shared library version mismatch.  I built
some shared library (.so) files with g++ 4.2.2.  My client's program,
built with g++ 3.4.6, cannot load the library with dlopen.  On his
box, ldd reports that version CXXABI_1.3.1 and GLIBCXX_3.4.9 not found
in libstdc++.so.6.

Is it generally supported to use a shared library built with one
version of g++ and expect it to work in a program built with another
version of g++?


 No, generally speaking, it is not possible to build against a new glibc and
make it work with a glibc installation of an older major version.  In
addition, there are almost certainly incompatibilities due to such a major
difference in g++ version.


Tim, thanks for your help.

I am trying to find a solution to resolve this if possible.  Would it
help if my client installs the newer libstdc++.so of gcc 4.2.2?  His
program built with old gcc should continue to work, and ldd (or
dlopen) of my shared library should also work?  The interface to my
shared lib is C style interface, so hopefully all would be fine?

Please let me know whether this is a feasible approach?


If you pass along all the shared libraries required (ldd a.out will show which they are), for which your client's installation is out of date, this should be possible. Static link may be another possibility.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux