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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:25:03+00:00 2026-06-09T09:25:03+00:00

On the Boost library documentation page, there are two categories named Header Only Libraries

  • 0

On the Boost library documentation page, there are two categories named “Header Only Libraries” and “Automatic Linking“.

I suppose “Header Only Libraries” means you don’t have to link against Boost libraries in order to use them, and “Automatic Linking” means you have to link.

But when I use Boost.Timer, I have to link a static or dynamic library named timer (libboost_timer.a and libboost_timer.so.1.48.0 and various soft links to these under Linux library path), which is apparently the exact library file of Boost.Timer. I even need to link against Boost.System and Boost.Chrono, though it is understandable that the library itself uses some other libraries that need to be linked.

On the other side, Boost has clearly stated that Boost.Asio belongs to “Automatic Linking”, but there aren’t any library files named anything like asio.

So what does it actually mean to be a “header-only library” or “automatic linking“? Or is it purely a mistake?

  • 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-09T09:25:05+00:00Added an answer on June 9, 2026 at 9:25 am

    As you said, “Header only library” means that the whole library is in header files, so one (or several) #include lines is enough to use it. No linking is necessary.

    “Automatic linking” means that, although the library needs some linking (either directly or as a dependency), you don’t need to specify it in the compiler line, because the #include‘d files will do some magic to bring in the appropriate libraries automatically, if supported by the compiler.

    For example, in MSVC compilers, they use #pragman comment(lib, "..."); in Borland compilers they use #pragma defineoptions;, etc.

    And most notably, “automatic linking” is not supported by the GNU compiler.

    Automatic linking can be troublesome sometimes (for example, mixing debug and release versions), and you can selectively disable them by defining some preprocessor macros: BOOST_<libname>_NO_LIB. In that case you will have to do the linking manually.

    UPDATE: About your comment below:

    Boost.Timer claims to be a “Header only library” but it has lib files in the lib directory.

    It looks like there is an error in the Boost documentation. Actually there are two different libraries named timer: The old, deprecated, header-only <boost/timer.hpp> and the new, improved, cooler, automatically linkable <boost/timer/timer.hpp>.

    But for some reason, the main documentation page lists the properties of the old one.

    There’s no Boost.Asio lib files.

    In the main Boost library documentation page library documentation page, you can see that Asio is listed as Automatic linking due to dependency. The specific dependencies are listed elsewhere: Boost.System and Boost.Regex, and both present automatic linking.

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

Sidebar

Related Questions

The Boost.Pool documentation says that (emphasis mine): The Boost Pool library is a header-only
I have been using Boost (the header only library part) for sometime now. I
I was wondering if there was a way to use the boost library in
I found there are also a pthread in Boost library, is it the same
I'm new to programming, and I'm having trouble linking to a Boost library in
It's not clear to me what linking options exist for the Boost.Thread 1.34.1 library.
In the documentation of the algorithm isomorphism of the Boost Graph Library, it is
Several times, while perusing the Boost library's documentation, I've run across return values that
I discovered a strange result in Boost C++ date time library. There is inconsistency
I thought there was a boost library that allowed me to parse unix conf

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.