Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top