GCov and GCC, * .da Files not created

I am using GCC version 3.3.6. When I process my object files with -fprofile-arcsand -ftest-coverage, the corresponding *.bband files are created *.bbg.

Object files are then joined together in a static library libfoo.awith:
ar rcs libfoo.a foo1.o foo2.o.

Finally, a series of static libraries are linked together to create my executable with: gcc -fprofile-arcs -o foo.o <static libraries linked all>

Now when I run the image, * .da files are not created. Is there any step that I am missing? Does anyone have any other suggestions?

Thank.

+3
source share
1 answer

The executable must be linked to the gcov library:

gcc -fprofile-arcs -o foo.o <static libraries linked all> -lgcov

EDIT. gcc 4.1.2, --coverage -fprofile-arcs -ftest-coverage ( ) -lgcov ( ).

, , , . . gcc (4-1) : GCOV_PREFIX GCOV_PREFIX_STRIP, . - gcc doc.

+3

Source: https://habr.com/ru/post/1767919/


All Articles