amelie
April 15th, 2008, 06:18 PM
How do I compile w/ gcov in CodeBlocks? So far I have attempted to use the following directions (given by my professor):
-----------------------------------------------------------------------------------------------
To use gcov, we compile with these special options:
-fprofile-arcs -ftest-coverage
In CodeBlocks, we can add these to
"Project -> Build Options -> Compiler Settings -> Other options", and
also by going to ""Project -> Build Options -> Linker Settings" and,
under "Link libraries", adding the
libgcov.a file found inside the CodeBlocks installation
directory, probably under MingW\lib\gcc\mingw32\3.4.5
(the version number at the end may vary).
When the code has been compiled, in addition to the usual
files there will be several files with endings like
.bb, .bbg. These hold data on where the
statements and branches in our code are.
-----------------------------------------------------------------------------------------------
After following the directions and compiling my code, the "several files" (.bb, .bbg, etc) were not created. Perhaps I did not follow the directions properly? Or perhaps there is something else I'm missing?
Any help would be appreciated. Thank you.
-----------------------------------------------------------------------------------------------
To use gcov, we compile with these special options:
-fprofile-arcs -ftest-coverage
In CodeBlocks, we can add these to
"Project -> Build Options -> Compiler Settings -> Other options", and
also by going to ""Project -> Build Options -> Linker Settings" and,
under "Link libraries", adding the
libgcov.a file found inside the CodeBlocks installation
directory, probably under MingW\lib\gcc\mingw32\3.4.5
(the version number at the end may vary).
When the code has been compiled, in addition to the usual
files there will be several files with endings like
.bb, .bbg. These hold data on where the
statements and branches in our code are.
-----------------------------------------------------------------------------------------------
After following the directions and compiling my code, the "several files" (.bb, .bbg, etc) were not created. Perhaps I did not follow the directions properly? Or perhaps there is something else I'm missing?
Any help would be appreciated. Thank you.