【问题标题】:How to resolve "relocation truncated to fit: R_X86_64_PC32 against undefined symbol `xercesc_3_1::AbstractDOMParser::adoptDocument()'"如何解决“重定位被截断以适应:R_X86_64_PC32 针对未定义符号 `xercesc_3_1::AbstractDOMParser::adoptDocument()'”
【发布时间】:2022-02-14 16:04:20
【问题描述】:

我正在尝试在 Eclipse 中构建一个使用库 xerces-c-3.1.1-x86_64-linux-gcc-3.4(二进制)的 C++ 程序。我看到以下错误...


  1. relocation truncated to fit: R_X86_64_PC32 against undefined symbol xercesc_3_1::AbstractDOMParser::adoptDocument()

  2. undefined reference to xercesc_3_1::AbstractDOMParser::adoptDocument()


浏览了 stackoverflow (What does this GCC error "... relocation truncated to fit..." mean?) 上的链接,了解这是什么类型的错误,但没有找到解决方法。

我正在使用的环境:Windows8.1 上的 Cygwin64 和配置为使用 Cygwin C++ 编译器的 Eclipse。尝试了 xerces-c-3.1.1-x86_64-linux-gcc-3.4 和 xerces-c-3.1.1-x86-linux-gcc-3.4 并得到了同样的错误。 我错过了什么吗?

【问题讨论】:

    标签: c++ eclipse cygwin relocation


    【解决方案1】:

    我通过使用 Cygwin 安装程序中的 libxerces-clibxerces-c-devel 解决了这个问题(使用这两个附加软件包重新运行安装程序)。我摆脱了上述错误以及signal 11 [Segmentation fault] 错误。发现这些二进制文件适用于 Cygwin 环境。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-08-13
      • 1970-01-01
      • 1970-01-01
      • 2016-06-30
      • 2019-05-23
      • 2019-01-02
      • 2013-12-25
      相关资源
      最近更新 更多