danny payton <dannyx.payton@xxxxxxxxx> writes: > I used g++ to compile an executable on an older Linux. > ldd shows it is linked against libstdc++.so.5: > > linux-gate.so.1 => (0xffffe000) > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7f29000) > libm.so.6 => /lib/tls/libm.so.6 (0xb7f04000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ef9000) > libc.so.6 => /lib/tls/libc.so.6 (0xb7dc7000) > /lib/ld-linux.so.2 (0x80000000) > > But I found that people with newer library cannot run it > so I had to recompile my program to produce an alternate version > like so: > > linux-gate.so.1 => (0xffffe000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e8d000) > libm.so.6 => /lib/tls/libm.so.6 (0xb7e68000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e5d000) > libc.so.6 => /lib/tls/libc.so.6 (0xb7d2b000) > /lib/ld-linux.so.2 (0x80000000) > > Is there a way to compile a C++ program using g++ so that it works > with library versions ">=" some version number? No. Sorry. Changes in the major version number indicate incompatible code. Ian