title: C++ Using gcov and lcov problem?
body: <p>I am using ubuntu 10.1, g++ compiler.</p>
  
  <p>I trying to use gcov and lcov for my C++ project. I manage to compile the gcov:</p>
  
  <pre><code>g++ -fprofile-arcs -ftest-coverage main.cpp user.cpp game.cpp
  </code></pre>
  
  <p>There is no error or warning message. Next I try to run gcov:</p>
  
  <pre><code>gcov main.cpp user.cpp game.cpp
  </code></pre>
  
  <p>Also fine. I also try to run my program:</p>
  
  <pre><code>./a.out
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>lcov --directory /home/projects/Game1/ -c -o application.info
  </code></pre>
  
  <p>But it gives me this:</p>
  
  <pre><code>Capturing coverage data from /home/projects/Game1/
  geninfo: ERROR: cannot read /home/projects/Game1/!
  </code></pre>
  
  <p>I search all over the web, read lcov documentation, I cant find the answers. Anyone can help me?</p>
  
  <p>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.</p>
  
  <p>Please help me.. anyone?? </p>
  
  <p>EDIT:</p>
  
  <p>I admit, its my mistake (i am terribly sorry, "home/Projects/Game1" with capital "P".)
  After verifying the path, I got this new error:</p>
  
  <pre><code>geninfo: ERROR: /home/Projects/Game1/main.gcno: reached unexpected end of file
  </code></pre>