I have a c++ code that runs perfect on my linux machine (Ubuntu Karmic). When I try to run it on another version, I have all sort of shared libraries missing.
Is there any way to merge all shared libraries into single executable?
Edit: I think I've asked the wrong question. I should have ask for a way to static-link my executable when it is already built. I found the answer in ermine & statifier
There are 3 possible reasons you have shared libraries missing:
libz.so.1.2.3
and the other machine has an API compatible (major version 1
) but different minor version 2.3
, which would probably work with your program if only it would linklibc.so.2
vs libc.so.1
.The fixes are:
libz.so.1
instead of libz.so.1.2.3
.