How to resolve “relocation truncated to fit: R_X86_64_PC32 against undefined symbol `xercesc_3_1::AbstractDOMParser::adoptDocument()'”

被刻印的时光 ゝ 提交于 2019-12-02 05:30:26

问题


I am trying to build a C++ program in Eclipse that uses a library xerces-c-3.1.1-x86_64-linux-gcc-3.4 (binary). I see the below errors ...


  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()


Gone through a link on stackoverflow (What does this GCC error "... relocation truncated to fit..." mean?) and understood what type of error is this but did not get a solution on how to resolve it.

Environment I am using: Cygwin64 on Windows8.1 and Eclipse configured to use Cygwin C++ compiler. Tried both xerces-c-3.1.1-x86_64-linux-gcc-3.4 as well as xerces-c-3.1.1-x86-linux-gcc-3.4 and got the same error. Am I missing something?


回答1:


I Solved the problem by using the libxerces-c and libxerces-c-devel from Cygwin setup (re-ran the setup with these two additional packages). I Got rid of above errors as well as signal 11 [Segmentation fault] error. These binaries are found to be suitable for Cygwin environment.



来源:https://stackoverflow.com/questions/33719825/how-to-resolve-relocation-truncated-to-fit-r-x86-64-pc32-against-undefined-sym

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!