Dice
07-31-2003, 09:28 AM
I've written a program in c++ to run on webservers. Basically, it handles traffic on web sites. Since many hosts use different OS's, like redhat, trustix, debian, slackware, suse, mandrake, etc, etc. right now I have to compile my script on every of those OSs so it can run.
This is very time consuming, when you consider compiling it takes about 2 hours / OS.
Now, all these OS's are linux. And I've seen several other programs online where's
simply one linux package, that will run on any linux distro.
The only specification on those scripts were
"Linux Version - glibc 2.1 and higher"
My question is, how do I do this?
What commands do I give to g++ so it's entirely cross-compatible?
I just want to be able to compile it on my redhat 7.2 copy for example, put that online as a generic linux version, that will run on any other linux distro.
The things that keep bugging me are errors such as
"error in loading shared libraries: libstdc++-libc6.2-2.so.3:
cannot open shared object file: No such file or directory"
I figured that if I can compile it so it doesn't use libstdc++-libc6.2-2.so.3, but simply uses libstdc++-libc.so (version-less), it should do the trick...
Thank you for any help
This is very time consuming, when you consider compiling it takes about 2 hours / OS.
Now, all these OS's are linux. And I've seen several other programs online where's
simply one linux package, that will run on any linux distro.
The only specification on those scripts were
"Linux Version - glibc 2.1 and higher"
My question is, how do I do this?
What commands do I give to g++ so it's entirely cross-compatible?
I just want to be able to compile it on my redhat 7.2 copy for example, put that online as a generic linux version, that will run on any other linux distro.
The things that keep bugging me are errors such as
"error in loading shared libraries: libstdc++-libc6.2-2.so.3:
cannot open shared object file: No such file or directory"
I figured that if I can compile it so it doesn't use libstdc++-libc6.2-2.so.3, but simply uses libstdc++-libc.so (version-less), it should do the trick...
Thank you for any help