gcov support for shared library

Neuberger, Daniel [USA] neuberger_daniel@bah.com
Mon Sep 20 20:59:00 GMT 2010


Hi Andi,

You were absolutely, right.  Thanks so much for the help.  We're using autotools and it turns out that all of the .gcda files were ending up in the .libs directory.  The script we were using to produce output from gcov was finding them correctly, but since they weren't in the same directory as the source files, gcov didn't produce any output.  At least that's my understanding of the situation.  So for anyone else who comes across this thread:

a) check your .libs directory (i.e. your output will be wherever your .so file is - for shared libraries)
b) move your .gcda files to wherever your source files are or gcov won't work with them.

Feel free to correct me if I'm wrong, but that's what's working for me.

Thanks again for the help.

- Daniel

P.S.  Sorry for the double send; I forgot to copy gcc-help



More information about the Gcc-help mailing list