I am trying to get html coverage for a test using gcc 4.8.2 and lcov 1.10. I am sure that my source, objects and gcov files are at same place and that I'm running lcov from directory where I ran my compiler from as well.
I'm getting the following error:
$ lcov --capture --directory "objs/i386/MinGW/Os_SingleCore_SC3
/IocTest_tests_SingleCore_SC3" --output-file coverage.info
Capturing coverage data from objs/i386/MinGW/Os_SingleCore_SC3/IocTest_tests_SingleCore_SC3
Found gcov version: 4.8.2
Scanning objs/i386/MinGW/Os_SingleCore_SC3/IocTest_tests_SingleCore_SC3 for .gcda files ...
Found 3 data files in objs/i386/MinGW/Os_SingleCore_SC3/IocTest_tests_SingleCore_SC3
Processing IocTest_tests_SingleCore_SC3/IocTest.gcda
geninfo: WARNING: cannot find an entry for objs#i386#MinGW#Os_SingleCore_SC3#IocTest_tests_SingleCore_SC3#IocTest.c.gcov in .gcno file, skipping file!
geninfo: WARNING: no data found for /cygdrive/e/testRepo/WinPort-Os-cd354a27d1d9/WinPort/Os/Tests/OS_REQ/objs\i386\MinGW\Os_SingleCore_SC3\IocTest_tests_SingleCore_SC3\IocTest.c
Processing IocTest_tests_SingleCore_SC3/OS_REQ.gcda
geninfo: WARNING: cannot find an entry for objs#i386#MinGW#Os_SingleCore_SC3#IocTest_tests_SingleCore_SC3#OS_REQ.c.gcov in .gcno file, skipping file!
geninfo: WARNING: no data found for /cygdrive/e/testRepo/WinPort-Os-cd354a27d1d9/WinPort/Os/Tests/OS_REQ/objs\i386\MinGW\Os_SingleCore_SC3\IocTest_tests_SingleCore_SC3\OS_REQ.c
Processing IocTest_tests_SingleCore_SC3/TestMain.gcda
geninfo: WARNING: cannot find an entry for objs#i386#MinGW#Os_SingleCore_SC3#IocTest_tests_SingleCore_SC3#TestMain.c.gcov in .gcno file, skipping file!
geninfo: WARNING: no data found for /cygdrive/e/testRepo/WinPort-Os-cd354a27d1d9/WinPort/Os/Tests/OS_REQ/objs\i386\MinGW\Os_SingleCore_SC3\IocTest_tests_SingleCore_SC3\TestMain.c
Finished .info-file creation
Firstly I would suggest to check if gcov returns correct coverage data. Means need to run gcov tool and check *.gcov file for actual result. If it returns any coverage.
Secondly you could use --base-directory, for example
$ lcov --base-directory . --directory . -c -o gcov/lcov.info