質問

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

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top