title: How do I tell lcov where to find my .cpp & .h files?
body: <p>My source and build tree looks like this (see <a href="https://stackoverflow.com/questions/4102469/makefile-to-put-object-files-from-source-files-different-directories-into-a-singl">Makefile to put object files from source files different directories into a single, separate directory?</a>) after a make (which builds and runs FooAndBarTests):</p>
  
  <pre><code>src
  - Foo.cpp
  - Bar.cpp
  inc
  - Foo.h
  - Bar.h
  test
  - FooTest.cpp
  - BarTest.cpp
  - Main.cpp
  - Makefile
  - obj
    - Foo.gcda
    - Foo.gcno
    - Bar.gcda
    - Bar.gcno
  - FooAndBarTests
  UnitTest++
  - libUnitTest++.a
  - src
    - ...
  </code></pre>
  
  <p>I can then produce .gcov  files in the test directory by running <code>gcov -o obj/ ../src/Foo.cpp</code> and <code>gcov -o obj/ ../src/Bar.cpp</code>.</p>
  
  <p>But if I run <code>lcov -d obj/ -c -o FooAndBarTests.lcov</code> I get:</p>
  
  <pre><code>Capturing coverage data from obj/
  Found gcov version: 4.2.1
  Scanning obj/ for .gcda files ...
  Found 4 data files in obj/
  Processing Foo.gcda
  ../src/Foo.cpp:cannot open source file
  Processing FooTest.gcda
  FooTest.cpp:cannot open source file
  ../inc/Foo.h:cannot open source file
  ../UnitTest++/src/Checks.h:cannot open source file
  ...
  </code></pre>
  
  <p>And then when I run <code>genhtml FooAndBarTests.lcov</code> I get:</p>
  
  <pre><code>Reading data file FooAndBarTests.lcov
  Found 45 entries.
  Found common filename prefix "/Users/dspitzer/FooAndBar/test"
  Writing .css and .png files.
  Generating output.
  Processing file UnitTest++/src/Checks.h
  genhtml: ERROR: cannot open /Users/dspitzer/FooAndBar/test/UnitTest++/src/Checks.h for reading!
  </code></pre>
  
  <p>How do I tell lcov and genhtml where the .cpp and .h files are?</p>