I am using ubuntu 10.1, g++ compiler.
I trying to use gcov and lcov for my C++ project. I manage to compile the gcov:
g++ -fprofile-arcs -ftest-coverage main.cpp user.cpp game.cpp
There is no error or warning message. Next I try to run gcov:
gcov main.cpp user.cpp game.cpp
Also fine. I also try to run my program:
./a.out
and run gcov again, my main, user and game.cpp shows some percentage now. I want to capture the data, I type this in terminal:
lcov --directory /home/projects/Game1/ -c -o application.info
But it gives me this:
Capturing coverage data from /home/projects/Game1/
geninfo: ERROR: cannot read /home/projects/Game1/!
I search all over the web, read lcov documentation, I cant find the answers. Anyone can help me?
In addition, I also could not open the main.gcda file.(I tried open using text editor, it says some character encoding problem, quite alot: UTF-8, Western (ISO-8859-1), Western (ISO-8859-11) etc, but still cant open and read the file.
Please help me.. anyone??
EDIT:
I admit, its my mistake (i am terribly sorry, "home/Projects/Game1" with capital "P".) After verifying the path, I got this new error:
geninfo: ERROR: /home/Projects/Game1/main.gcno: reached unexpected end of file