0

Iam trying to run Sconscript using gcc in c++ program Iam using linux redhat 5 code for compiler in 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
renjana
  • 13
  • 1
  • 7
  • Have you tried to search the web for the given error message? Possibly related: https://stackoverflow.com/questions/11703709/hidden-symbol-atexit-is-referenced-by-dso-when-using-libtool-with-gcov – dirkbaechle Apr 27 '18 at 12:56
  • You have "env.Append =(CCFLAG = '-fprofile-arcs')" and not "env.Append(CCFLAG = '-fprofile-arcs')" ? – bdbaddog Apr 27 '18 at 18:58
  • Have tried the above command but also it is not working – renjana Apr 28 '18 at 03:51

0 Answers0