Pregunta

For some reasons I have to use an older version of gcc, gcc2.96 or gcc 3.23 Using the same, I need to perform a code coverage analysis on some code.

However when I try to perform linking with -lgcov option, I get

/usr/bin/ld: cannot find -lgcov

I have found that I do not have libgcov.a in /usr/lib. However my understanding was that libgcov is normally installed automatically while installing gcc.

Any suggestion on how I can fix this issue would be greatly appreciated

¿Fue útil?

Solución

libgcov.a was added only from gcc 3.4. For earlier versions of gcc, this option is not needed for linking.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top