gpt4 book ai didi

c++ - 为较旧的 glibc 构建

转载 作者:太空宇宙 更新时间:2023-11-04 12:10:09 24 4
gpt4 key购买 nike

我正在构建 32 位 C++ 库,它将在现代 Ubuntu 机器上的旧系统上运行。应用程序在 Ubuntu 上运行良好,但是当我转移到旧的 Centos 6.9 机器上时出现错误:

Failed to open my lib: /usr/lib/libstdc++.so.6: version 'GLIBCXX_3.4.21' not found (required by /home/aaa/bbb/libme.so)

如何解决这个问题?如何为旧版 glibc 构建?

最佳答案

The only way to tell the compiler and linker to use older symbol versions is by using linker scripts. However, this requires you to specify the version for each and every symbol, which is an undoable task.

您可以使用 Holy Build Box

Holy Build Box solves the glibc symbol problem by providing a tightly-controlled build environment that contains an old version of glibc.

关于c++ - 为较旧的 glibc 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49302522/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com