隐藏的gcov_init由DSO引用

时间:2018-04-27 09:50:14

标签: c++ gcc scons gcov

我试图在c ++程序中使用gcc运行Sconscript     我使用linux redhat 5     sconscript中编译器的代码: -

env.Append =(CCFLAG = '-fprofile-arcs')
env.Append =(CCFLAG = '-ftest-coverage')
env.Append =(CCFLAG = '--coverage')

code for Linker in sconscript:-

env.Append =(LINKFLAG= '-fprofile-arcs')
env.Append =(LINKFLAG= 'lgcov')
env.Append =(CCFLAG = '--coverage')

During compilation i get the below error

/usr/bin/ld: TU/Exe/Release/gcc_rhel5_tao/test_SCRECORDER.exe: hidden symbol '__gcov_init' in /usr/lib/gcc/i386-redhat-linux/4.1.2/libgcov.a(_gcov.o) is referenced by DSO 
Final link failed:nonrepresentable section on output

0 个答案:

没有答案