Closed hotmandu closed 5 months ago
I solved the issue by checking if adding #include
directives to original source file is necessary.
For example, try to look for differences between *.i
files that does or does not include <stdio.h>
.
Thanks! I've solved the issue by manually checking. But I still wonder if there exists simpler way to do this..
There is no simple way to deal with this problem in general.
One way is to copy the library code, rename the variables with common prefixes(such as __kcov_
), and let kcov to instrument it. However, it's still complicated.
To make sure some header are included, I wrote
#include
directives at the beginning of the output-cov.c
files. (Following from this discussion) However, when I try to compile it, gcc refuses because of conflictions by duplicate declarations. Below is the part of the compilation log.The solution provided does not works... Could you give a hint on this?