且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Linux上编译和链接不同版本的gcc

更新时间:2023-11-13 13:05:34

Linux具有C ++应用程序二进制接口(ABI),已经存在了一段时间.这意味着在Linux上跨编译器的调用约定和名称修改是固定的.因此,只要这些库兼容,您就应该能够使用不同的编译器(或同一编译器的不同版本)进行编译,并且具有正确可靠地链接在一起的代码.

Linux has a C++ Application Binary Interface (ABI), which has been around for a while. This means that the calling conventions and name mangling across compilers on Linux is fixed. Therefore, as long as the libraries are compatible, you should be able to compiler with different compilers (or different versions of the same compiler) and have code which correctly and reliably links together.

ELF要求本身不完全是 ...

Not entirely the ELF requirements per se...