問題描述
CentOS7 的 libprotobuf‑lite.so 文件在 CentOS8 機器上工作嗎? (is libprotobuf‑lite.so file from CentOS7 working in CentOS8 machine?)
我將 CentOS7 (libprotobuf‑lite.so.8.0.0) 中的 C++ libprotbuf‑lite.so 打包到我的軟件中。如果安裝在 CentOS 8 機器上可以嗎?
參考解法
方法 1:
If the application that uses the protobuf library is compiled using default CentOS 8 g++ compiler with option:
‑D_GLIBCXX_USE_CXX11_ABI=0 ‑std=gnu++98
then it works with the protobuf library from/compiled in CentOS7. Otherwise, it has ABI compatibility issue. By default CentOS7 g++ verison does not use C++11 ABI.