title: shared library coverage test with gcov [Linux/Fortran]
body: <p>I am trying to perform a coverage test of a shared library. I have chosen for gcov/lcov due to the fact, that it is free and open source, which means, I can try it immediately (commercial software would need to be approved/purchased, a lot of decision would have to be made - it costs time).  </p>
  
  <p>The situation is as follows - the library - our product, written in Fortran is then used for simulation software (ADAMS from MSC.Software, to be specific). I can compile the library with -fprofile-arcs -ftest-coverage and it works properly if used by ADAMS. However, no .gcda files are created.  </p>
  
  <p>There is a small test executable to test basic behaviour of the library (small subset of the methods). If I compile this executable with coverage tests switches, I get .gcda files for both the executable itself and the library.  </p>
  
  <p>The question is: <strong>is it possible to invoke gcov measurements for the library if the executable using the library was not compiled with coverage test switches?</strong> And if yes, how?  </p>
  
  <p>It is possible to write extensive test, but it will be almost like replicating ADAMS (or any other simulation package). Or have I chosen wrong coverage test tool and I should move to commercial products?  </p>
  
  <p>Thank you in advance.  </p>
  
  <p>Mike</p>