Maciej wrote:
Hello!
I have started work with GCC 4.1.2 under Mandriva 2007.1. I have noticed, the compiler is very good. For compilation
I am using g++ command. When I am using programs with my system everything is ok, but under older systems there is a
problem. I have found in manual -static option, but when I am using it, program have about 1,2MB (it is small program
for console without GUI). I have tested work of generated binaries and now I know, binaries prepared under 2.6 Kernel
with -static option will not work under 2.4 Kernel.
What is the best solution for building small programs possible to run in console of old and the future Linux systems?
Is compilation under target system the only way to do it?
Most systems provide future compatibility (e.g. if it works on OSVer 1.x
it will work on OSVer 2.x), but not the reverse. This is due to changes
in the interfaces - in your case the Kernel has changed, so even
including the libraries as static libs doesn't work because the backend
ABI has changed.
The only real solution would be to build on the "lowest common
denominator", e.g. build it on your old system and move the application
to the new systems.
Best Regards!
Maciej
----------------------------------------------------------------------
Chcesz zobaczyc jak mieszkaja inni? Podpatrzec pomysly,
pochwalic sie wlasnym mieszkaniem?
Wejdz na >>> http://link.interia.pl/f1c74