Peter111
Peter111

Reputation: 823

C++ lcov reached unexpected end of file

I try to create a coverage report. I use

make clean all and make coverage.

I have Boost and lcov installed. But when I try make coverage it fails with the following error message:

Processing components/Project/CMakeFiles/ProjectMainController.dir/dataHandling/savingUnit/Trimmer.cpp.gcda
geninfo: ERROR: /home/user/ProjectFolder/Project/build/source/Project/components/Project/CMakeFiles/ProjectMainController.dir/dataHandling/savingUnit/Trimmer.cpp.gcno: reached unexpected end of file
make[3]: *** [CMakeFiles/coverage] Error 255
make[2]: *** [CMakeFiles/coverage.dir/all] Error 2
make[1]: *** [CMakeFiles/coverage.dir/rule] Error 2

The strange part is: I havent even written any tests for the Trimmer class and there isnt even a TrimmerTest file. Can you help me?

Upvotes: 2

Views: 3522

Answers (2)

Hieu Dang
Hieu Dang

Reputation: 156

To fix this issue, you can try another version of lcov such as version 1.0

Upvotes: 1

Peter111
Peter111

Reputation: 823

Fixed the problem by completly deleting the content of the build folder

Upvotes: 1

Related Questions