I have a C++ app where I use some C functions. I have declared those C functions inside extern "C" {}; And it is compiling and working just fine. I am using 'gcc' for compiling the C code, and using 'g++' for linking that object with C++ object.
GCOV fails by throwing me the following error:
hidden symbol `__gcov_init' in /usr/lib/gcc/x86_64-linux-gnu/5/libgcov.a(_gcov.o) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
I have no idea as this is new to me combining C and C++ code. Any one have idea why "gcov" failing with linking stage. If I disable those "C" functions in my app then it "gcov" is not giving me that error.
C Functions I am using just initialising a struct which has function pointers in it with some functions.
Any help is really appreciated.
Thanks