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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:36:23+00:00 2026-06-10T10:36:23+00:00

Say I find a very nice open source library in the internet and now

  • 0

Say I find a very nice open source library in the internet and now I want to use it for my own project.

I download it, possibly compile it and get the header files & the static/dynamic library.

So I start writing my own source files and of course when I want to use functionality from this external library I include the right headers of it into my source files.

Now I compile my source file, make sure the include paths and linker options for this external library are set correctly.

And I get heaps of errors, all coming from the external headers.
Turns out they require some compiler flags.

How do I find out the minimal compiler flags that I have to set (to be able to compile headers from an external library)?

What I’ve thought about it so far:

  1. Look them up in the building script of the source (can be quite hard, since there are many places where they can be defined and they may not be the minimal flags, since they may be required for all headers together, but not for specific ones I use)
  2. Google every error message and hopefully that’ll give the answer (can be hard with a lot of error messages and google might not know the answer, or I might not know the right keywords to find the answer)
  3. Maybe somehow ‘include’ the build script of the external library into my own project (could be very hard, since I might want to use a different build system and I’d probably have to fully understand the build system myself, which could be hard for bigger libraries)
  • 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-10T10:36:25+00:00Added an answer on June 10, 2026 at 10:36 am

    Any well behaved open source library ships with instructions on how to use their development files. On GNU/Linux systems, it’s usual to have pkg-config files (*.pc) installed together to development headers and libraries, in which case pkg-config --cflags library-name will tell about required compilation options.

    Where pkg-config can be used, it’s just a matter of telling the build-system which components you’d like to import. E.g. on autotools.

    PKG_CHECK_MODULES([DEPS], [libname])
    

    And then make use of DEPS_CFLAGS and DEPS_LIBS variables on .am files.

    E.g. on a shell command-line:

    $ gcc $(pkg-config --cflags libname) -c main.c
    $ gcc $(pkg-config --libs libname) main.o -o test.exe
    

    Anyway, it’d be more productive if you could post specific info about the library used and which are the errors being generated.

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

Sidebar

Related Questions

So say that I want to find the word Hello, world! on a webpage.
At first I want to say: I couldn't find a support forum for this
I have a very, very large graph, and I want to find the shortest
I'm currently working on a GWT project. The thing is, I find very hard
Let's say you run the command find . -iname bob While it is running,
Let's say i need to find all .bar elements inside an element that's assigned
Say I had the two tables below, how do I find all questions with
Say I have the following query ICriteria query = session.CreateCriteria(typeof(T)); How can I find
say a ruby script is running ruby.rb SOMEUSERID using PHP, how can i find
My basic intention is to find out whether a dir say A is immediately

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.