How to resolve “relocation truncated to fit: R_X86

2019-02-28 11:38发布

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条回答
放荡不羁爱自由
2楼-- · 2019-02-28 12:09

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.

查看更多
登录 后发表回答