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 7815133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:25:13+00:00 2026-06-02T05:25:13+00:00

I have a header file, for example elf.h or name of method, for example

  • 0

I have a header file, for example “elf.h” or name of method, for example “ElfData::addToSection()”.

I’d like to know the corresponding library file – the name of it and it’s location, for example /usr/lib/libelf.a, or /usr/lib/libelf.so.0.8.13.
What are the ways to solve this problem. And what is the best way.

Also i’d like to know what headers, functions match to specified library file.
Operational system = Ubuntu Linux.

May be, these questions are stupid 🙂
but I would appreciate it if you could reply.

  • 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-06-02T05:25:15+00:00Added an answer on June 2, 2026 at 5:25 am

    For newer libraries, you can often use the pkg-config tool. You give this the name of the package you want to link with and it gives you the appropriate compiler/linker options:

    $ pkg-config --cflags glib-2.0
    -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
    $ pkg-config --libs glib-2.0
    -lglib-2.0
    

    so that you can put this in your Makefile:

    LIBS = `pkg-config --libs glib-2.0` -lm      # link with glib and libm
    CFLAGS = -O2 `pkg-config --cflags glib-2.0`
    

    (It won’t find the headers for you, just the include dirs.)

    For libraries that do not support pkg-config, there’s no single correct way of finding out the header that a library belongs to or vice versa. You normally either hand-code this knowledge into your build system, or use something like the GNU autotools that allow checking multiple libraries/headers for the identifiers or symbols you need.

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

Sidebar

Related Questions

Assuming the following header file corresponding to, for example, a shared library. The exported
I have C header file containing the following type definition: // example.h typedef struct
I have a header file like this: #ifndef __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #define __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #ifdef _DEBUG //
I want to reimplement a library of which I have the header file. I
I want to add one HTML file into another. For example: I have header.html
I have the following C Header/Code Example: Header file struct category_info { int id;
I have a C header file like this: #ifndef RENDERER_H #define RENDERER_H static int
I have declared a property in the header file, for example @interface myClass {
I have created a header file and a corresponding .c file full of functions
I have the following example code and would like to know what kind of

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.