CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Threaded View

  1. #1
    Join Date
    Feb 2008
    Posts
    4

    Using gcov?

    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.
    Last edited by amelie; April 15th, 2008 at 06:49 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured