This is the mail archive of the gcc-help@gcc.gnu.org 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: libstdc++.so.5 vs libstdc++.so.6


Hello Danny,
On Sun, Jan 18, 2009 at 07:08:04AM -0800, danny payton wrote:
> On Sat, Jan 17, 2009 at 5:43 PM, Ian Lance Taylor wrote:
> > No.  Sorry.  Changes in the major version number indicate
> > incompatible code.
> 
> Dear Ian:
> 
> Thank you for your prompt reply.
> 
> Are there really no way out? I'm distributing a research project
> developed jointly by my professor and several other students,
> and currently we are forced to deliberately keep several different
> versions of Linux around, just so that we can build the *same*
> simple C++ source code and produce different versions of the library.
>
> [...]
>
> Okay. So I need to keep multiple Linux build boxes. That's fine.
No, I don't think that's necessary. You can just install different
versions of gcc in parallel on the same Linux box, and the compile using
libstdc++.so.5 and libstdc++.so.6 on the same machine.

Another possibility is that you distribute the adequate version of
libstdc++.so together with your compiled programm, and use the
environment-variable LD_LIBRARY_PATH to tell the linker where to find
the library. E.g using bash, the command

LD_LIBRARY_PATH=./lib ./program

will execute the program "program", and search (in addition to the
default locations) in the directory ./lib for libraries. If you store
there libstdc++.so.6, ist should work on all machines.

HTH,

Axel


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