简体   繁体   中英

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?

通过完全删除构建文件夹的内容来修复问题

要解决此问题,您可以尝试其他版本的 lcov,例如 1.0 版

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM