My issue is different than this question: the problem there was that he was compiling the same file twice.
I am only compiling each file once.
g++ -c "file_1.c" -o file_1.o -fprofile-arcs -ftest-coverage
g++ -c "file_2.c" -o file_2.o -fprofile-arcs -ftest-coverage
g++ -c "file_3.c" -o file_3.o
g++ file_1.o file_2.o file_3.o -lgcov --coverage
Then when I run it, I get the error:
./a.exe
libgcov profiling error:file_1.gcda:overwriting an existing profile data with a different timestamp
libgcov profiling error:file_2.gcda:overwriting an existing profile data with a different timestamp
...
QUESTION
Why is there an error given that I only compile each instrumented file once unlike the linked question?