Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1090577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:23:46+00:00 2026-05-16T23:23:46+00:00

I am recently using gcov to collect the code coverage info. gcov plays well

  • 0

I am recently using gcov to collect the code coverage info. gcov plays well with executable application 🙂 , but when I try to load a .so file, I got this error: unknown symbol __gcov_merge_add.

Then I search on Google and someone said adding -lgcov to the link flag(LDFLAGS), I did add this option and it didn’t work. I also try on –coverage option in link flag, cannot get rid of this error.

Can someone help on this issue?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:23:47+00:00Added an answer on May 16, 2026 at 11:23 pm

    I ran into that problem too, but have since solved it. I just use the –coverage option in both CPPFLAGS and LDFLAGS. I think that should take care of the compile issue for you.

    The shared object still doesn’t seem to produce .gcda files though and I’m not sure how to solve that problems. Like you said, it works fine with executables, but shared objects seem to have some problems.

    EDIT:
    Apparently, gcov does support shared objects now. I did a significant amount of research yesterday and found conflicting answers, so I mailed the gcc-help list. See thread here: http://gcc.gnu.org/ml/gcc-help/2010-09/msg00130.html. I haven’t tried solving my problem based on the answer yet, but I will post back when I do.

    EDIT 2:
    Shared objects do work with gcov (or rather than –cover option with gcc). There’s another post with details here: gcov: producing .gcda output from shared library?. It also references the same thread above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently started using lcov to visualize my code coverage. It's a great tool.
I recently started using SourceMonitor to review my (and others) code. Though I understand
I've written an application recently using SWT. In one of its dialog box, I
I've recently started using AutoComplPop , but I find the popup annoying when I'm
I recently started using JMeter to load test my webapp, locally on my pc.
I was until recently using $.load() to get a specific piece of another page
I recently started using Lazy throughout my application, and I was wondering if there
Was recently using some code along the lines of $(#divMenuContainer:visible).hide(explode); However after some time
I recently started using Silex. I have been grouping certain functionality of my application
Having recently started using cryptography in my application, I find myself puzzled by the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.