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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:08:48+00:00 2026-05-23T16:08:48+00:00

I had to build boost library for threading. So I gave the command ./bootstrap.sh

  • 0

I had to build boost library for threading. So I gave the command

./bootstrap.sh 

in the boost_1_46_1 directory. Then

bjam --toolset=gcc --build-type=complete --with-thread link=static stage

When I tried to compile a simple program involving threads, using the command below, I get errors.

g++ -I/home/sharatds/Downloads/boost_1_46_1 /home/sharatds/Downloads/boost_1_46_1/stage/lib/libboost_thread.a main.cpp -o ini
main.cpp:(.text+0x804): undefined reference to `boost::thread::join()'
main.cpp:(.text+0x9ec): undefined reference to `boost::thread::~thread()'

Am I missing something ?

  • 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-23T16:08:49+00:00Added an answer on May 23, 2026 at 4:08 pm

    I think that your build command is malformed. You are explicitly listing an archive library in an unusual way, and I think GCC is ignoring or misinterpreting it.

    Try separating your build into two steps. One step to compile your .cpp file to a .o, and then another to link the .o with the boost_thread archive library and emit an executable.

    g++ -I/home/sharatds/Downloads/boost_1_46_1 main.cpp -o main.o
    g++ main -o ini -L/home/sharatds/Downloads/boost_1_46_1/stage/lib/ -lboost_thread
    

    The first line above compiles your main.cpp into an object file. The second line links your object file with the boost_thread library. The -L argument acts much like the -I argument, but provides a search path for libraries, rather than include files.

    Also, I suspect that your argument to -I should actually be

    -I/home/sharatds/Downloads/boost_1_46_1/stage/include

    so that you are including the headers from the build results, rather than from the source tree itself. Just guessing on that one though.

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

Sidebar

Related Questions

I had completed an iPhone, and then decided to build an iPad version. So,
I used CMake and Visual C++ to build the HyDE library. Then, still in
I was wondering if anyone knew whether Visual Studio .NET had a parallel build
I had been asked to build crystal reports for an application, i used the
I had never tried Continuum as a build server until recently when a project
Has anybody had any success getting Team Build to show xUnit.net test results and
So just this week I had the opportunity to re-build my development machine and
I've never used an automated build system - to be honest, I've never had
had to return to a old app I had build in Classic ASP and
I have a web that I build with WebDeploymentProject. I thought I had build

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.