How can i compile my C++ files to work on ALL linux distributions.
The machine that i’ll compile them on is Ubuntu 10.10
If i compile them on Ubuntu 10.10, will they work on other Distros like ubuntu, fedora, debian, non debian distros.. etc?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
the resulting binary should work on most distros, given that it runs on the same architecture (64bit, 32bit, arm, mips etc).
the main point is: since you do not know what can be found on the target systems in advance, you have to bundle everything you can into either the binary you are shipping or in some kind of “chrooted” environment where you deploy external libs as well (stuff that can’t be linked statically) and then have some kind of a wrapper to use your deployed libs instead of the system libs.