About the binary compatibility of Linux

后端 未结 2 1291
时光说笑
时光说笑 2021-01-13 17:59

If I get some C++ code built by, lets say, GCC 4.8 on Ubuntu, the code has no GUI/interface, only call standard Linux libraries, then can the binary run on RHEL 5/6, with mu

2条回答
  •  我在风中等你
    2021-01-13 18:16

    Normally it can't. It will complain about libc being too old, for one.

    If you statically link with libstdc++ and carefully avoid newer glibc features, you may be able to get away with it. The latter is not always possible though. Static linking with libc is not officially supported and may work or not work for you.

提交回复
热议问题