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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:26:27+00:00 2026-05-27T16:26:27+00:00

Off late I have had too use some template libraries like Boost and Thrust

  • 0

Off late I have had too use some template libraries like Boost and Thrust (for CUDA) in some of my coding work.

For using a certain feature of the Boost library, one has to include the appropriate header.e.g. for boost::lexical_cast I have to use boost/lexical_cast.hpp. It is tiring to keep including the appropriate header for every new feature of Boost / Thrust which I use for my projects.

Is there any “shortcut” to tell the pre-processor to include all the header files stored under the boost library, so that I need not bother about which header file to include?

I am using GCC under Ubuntu.

  • 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-27T16:26:28+00:00Added an answer on May 27, 2026 at 4:26 pm

    You could simply make a mother-of-all header file like so:

    for i in $(find /usr/include/boost/); do echo "#include <"${i/"/usr/include/"/}">"; done > master_header.hpp
    

    Now you can add that and use precompiled headers (you may need an overnight compilation to make the PCH). You should also pass -Wl,-as-needed to the linker to avoid including unneeded libraries.

    As @sbi says, this isn’t advisable in the least, but since you asked… sometimes the best remedy against finding something “tiresome” is to see how much worse it could be!

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

Sidebar

Related Questions

In some of my programming, off late, I have often had to manually enter
I have been using themes for a while, and off late when I was
I'm sure that all of us have had to deal with telecommuters at some
Off late I have been dumping relatively large tables using SSMS. The usual way
I have been working on Java off late, couldn't figure out what this (String...
First off I would like to say that I have done ample research on
I have a multisite drupal installation with domain access module. Off late, I have
First off, I am using Windows XP. I have multiple hard drives and it
First off, I'm working on an app that's written such that some of your
I have a job interview late next week as a report developer. At this

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.