Approved: Fortect
Last week, some of our readers came across an error message stating that gcov cannot open Graph. There are many factors causing this problem. We’ll cover them below.
I choose gcov as my cover tool toOde for my c ++ project using gcc (now 4.6.3, soon 4.8) on Ubuntu at 12:04 pm and get an error that the graphics file won’t open. What does this incredible error mean? And how do I know if I have code coverage?
I have seen other solutions to this problem, the most popular of which is to use clang (gcov: cannot open street file) instead of gcc, but I cannot press the compiler button, I have to use gcc which is not a viable solution for my web site. Also, the gcov documentation explains how it should work with gcc.
Another cure was to fix the image config (http://ubuntuforums.org/showthread.php?t=1547252) but I’m not sure which config file this user is talking about if it’s mine. the problem is I don’t know how to fix it either
my .gcda and .gcno files are correctly created in my object
Outside the directory that is above my top directory where I compile my code and usually try gcov * .Ivcgcov -o directory / to / obj * .candgcov -o directory / to / obj * .gcdaandgcov -o directory / to / obj * .gcno
but none of the reasonsin why these solutions work; I still get the error that the graphic file won’t open.
Fourth Thererrrs
101
Not The Answer You Are Looking For? Browse Other Questions Tagged C ++ Gcc Ubuntu-12.04 Gcov Profiling, Or Ask Your Current Question Yourself.
The issue mentioned above is related to the missing .gcda and .File gcno in the database containing your source code
.
So my lesson is to send the first copy of the .gcda file and in addition the .gcno file of a specific .c in your source code, where the resttake your .c and then run gcov filename.c
.you
If you got a request, try linking all these .gcda and .gcno with the source, if you don’t want to copy from the obj web directory it will solve the problem as you pointed out
>
answered Oct 27, 2013 at 18:21
3,605
Let me explain a few things you bought differently
first: always try to tweak * .gcda, * .gcno, * .c, etc. after the obj trek directory, which is completely wrong.What you need to return is specify it as “-o path / to / obj /” (path to directory)
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
You can specify the path to the gcda file for that particular c / c ++ source file, and of course specify obj for the directory with the “-o” flag, which tells you that this file should be restored. …
And if you are using gcovr vmplace gcov in your reports, you can get any type of report by simply specifying the root directory (directory above src and obj) using the “-r -root = ROOT” flag.For more information on gcovr see this Approach User Guide.
answered Feb 24 17 at 6:53 am
1007
Speed up your computer's performance now with this simple download.