如果我得到一些C ++代码,比如Ubuntu上的GCC 4.8,代码没有GUI /接口,只调用标准的Linux库,那么二进制文件可以运行在RHEL 5/6上,还有更老的GCC吗?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.