James Hu <jxh@despammed.com> writes:[color=blue]
> On 2003-11-07, walter <gw.bbs@veryname.com> wrote:[color=green]
> > walter:[color=darkred]
> >> I have many computers running Linux. For some reasons,
> >> the versions are not the same. Now, I want to write a C program
> >> to run on them. "Compile once and run everywhere". Is there
> >> anything I have to take care of?
> >>
> >> Thanks
> >>[/color]
> > Some of my PC ares multi-processors, some are not.
> > The kernel I'm using is 2.4.x.[/color]
>
> You can write strictly conforming code. This gives you the best chance
> that your programs will do exactly what you intended no matter where
> you port your code to, so long the target platform supports the version
> of Standard C that you are coding to.[/color]
Strict conformance gives you portability of your source code, but the
OP specifically wants portability of the executable. This is
typically difficult or impossible across different processor
architectures (e.g., x86 vs. Alpha), but it's probably feasible if you
limit yourself to x86 systems. It's also well beyond the scope of
this newsgroup.
Try one of the Linux groups (I'm not sure whicn one is best).
--
Keith Thompson (The_Other_Keith)
kst@cts.com <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"