2
我试图编译一块linux下cpp的代码编译时以适应错误,并得到了以下错误:搬迁截断使用G ++
/tmp/ccIeh7Ta.o: In function `model::MulPLSA::EStep()':
mul_plsa.cpp:(.text+0xb12): relocation truncated to fit: R_X86_64_32S against symbol `model::MulPLSA::mItemLatRatDeno' defined in .bss section in /tmp/ccIeh7Ta.o
mul_plsa.cpp:(.text+0xb42): relocation truncated to fit: R_X86_64_32S against symbol `model::MulPLSA::mItemLatRatDeno' defined in .bss section in /tmp/ccIeh7Ta.o
/tmp/ccIeh7Ta.o: In function `model::MulPLSA::MStep()':
mul_plsa.cpp:(.text+0xcec): relocation truncated to fit: R_X86_64_32S against symbol `model::MulPLSA::mItemLatRatDeno' defined in .bss section in /tmp/ccIeh7Ta.o
collect2: ld returned 1 exit status
我的操作系统:Ubuntu的10.10
G ++:gcc版本4.4 .5(Ubuntu/Linaro 4.4.4-14ubuntu5)
任何人都遇到过这个错误?谢谢。
成
看http://amiatypist.blogspot.com/2010/05/relocation-truncated-to-fit-rx866432s.html可能是有用的... – fritzone 2011-05-20 10:33:29
的blogspot在中国无效。我谷歌这个问题,并发现在编译时添加选项-mcmodel =中可以解决这个问题。我这样做了,编译器抛出了一个waring:/tmp/ccG10FOV.s:3107:警告:忽略.lbss的不正确的节类型。无论如何,它的作品。 – user572138 2011-05-20 10:41:21
请给我们一个简单的例子。相关:http://stackoverflow.com/questions/10486116/what-does-this-gcc-error-relocation-truncated-to-fit-mean – 2015-09-03 21:24:09