Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22022

Using gcov to test a c++ program

$
0
0

I am using gcov for the first time to analyze my program (C++) The program consists of three classes and I have built the project using Code::Blocks. When I am invoking the program using the following command:

C:\Users\XXX\Documents\Test\TreeObjModel\src>gcc -fprofile-arcs -ftest-coverage Tree.cpp

I receive the following error:

Tree.cpp:1:18: fatal error: Tree.h: No such file or directory compilation terminated

While the cpp files are in the directory "C:\Users\XXX\Documents\Test\TreeObjModel\src\" , the header files are in directory "C:\Users\XXX\Documents\Test\TreeObjModel\include\"

Do we need to have both the code and header files in the same directory?

Thanks in advance.


Viewing all articles
Browse latest Browse all 22022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>