lcov icon indicating copy to clipboard operation
lcov copied to clipboard

Cannot open source file

Open pennam opened this issue 8 years ago • 3 comments

I'm having some troubles with relative paths. Running lcov.bat i'm getting this output

W:\geninfo.perl . --output-filename gcov/lcov.info --base-directory .Found gcov version: 4.8.1 Scanning . for .gcda files ... Found 8 data files in . Processing file_A.gcda Processing file_B.gcda Processing file_C.gcda Processing file_D.gcda Processing test_file.gcda Cannot open source file ../../test_file.c Processing test_file_runner.gcda Processing file_E.gcda Cannot open source file ../../file_E.c Finished .info-file creation Fixing back slashes ... Generating html ... The syntax of the command is incorrect.

is it possible to change the base directory of the source files leaving as it is the directory of gcda files?

pennam

pennam avatar Jul 13 '16 10:07 pennam

Tested with a simple project with *.c *.o *.gcna *.gcno files all in the same directory and it works. I need some help to understand how to configure the project paths properly

Thanks pennam

pennam avatar Jul 14 '16 09:07 pennam

Another update if i change lcov-bat command from

%perl% %idir%lcov.perl -b . -d . -c -o gcov/lcov.info

to

%perl% %idir%lcov.perl -b . -d w:\custom\path\ -c -o gcov/lcov.info

i'm getting the following output:

Creating gcov\lcov.info ... Capturing coverage data from w:\custom\path\ W:\lcov\path/geninfo.perl w:\custom\path\ --output-filename gcov\lcov.info --base-directory . Found gcov version: 4.8.1 geninfo.perl: ERROR: cannot read w:\custom\path\ !

any suggestion?

pennam avatar Jul 14 '16 12:07 pennam

HI pennam, about paths, usually lcov.bat is used/executed on root folder of the sources and all files should appear there.

As I understood, you are experiencing problems when you run lcov.bat from root? Could you please show how you run (if any difference to prev comments)? Also unfortunately not able to check due to no Windows installations I have today. Thanks

valbok avatar Jul 15 '16 14:07 valbok