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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:34:22+00:00 2026-06-08T09:34:22+00:00

I was trying to run a small test program on Xcode (4.2) using C++

  • 0

I was trying to run a small test program on Xcode (4.2) using C++ after encountering error in my project.

#include <boost/thread.hpp>
#include <boost/bind.hpp>    

int main (int argc, const char * argv[])
{
    boost::thread_group tg;
    return 0;
}

But the whole program fails to build, outputting error:

Undefined symbols for architecture x86_64:
  "boost::thread::~thread()", referenced from:
      boost::thread_group::~thread_group()in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Then I tried using

thread_group * tg = new thread_group();

which compiles without issue, up until I tried to invoke

tg->join_all();

where the compiler outputs errors such as:

Undefined symbols for architecture x86_64:
  "boost::detail::get_current_thread_data()", referenced from:
      boost::detail::interruption_checker::interruption_checker(_opaque_pthread_mutex_t*, _opaque_pthread_cond_t*)in main.o
  "boost::this_thread::interruption_point()", referenced from:
      boost::condition_variable::wait(boost::unique_lock<boost::mutex>&) in main.o
  "boost::this_thread::disable_interruption::disable_interruption()", referenced from:
      boost::shared_mutex::lock_shared()      in main.o
  "boost::this_thread::disable_interruption::~disable_interruption()", referenced from:
      boost::shared_mutex::lock_shared()      in main.o
  "boost::thread::join()", referenced from:
      boost::thread_group::join_all()     in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Does anyone know how to resolve these issues ? I’ve been using other functions such as BOOST_FOREACH without any issues. But encounter these while trying to use threads.

Do I need to:

  • Specify flags on my ‘Other Linker Flags’?
  • reinstall boost or some sort ? Currently I am using Boost 1.49.0, installed using homebrew (i.e. sudo brew install boost)

Or are there any other specific configurations that I need to to include ?

  • 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-08T09:34:24+00:00Added an answer on June 8, 2026 at 9:34 am

    The boost thread library has an actual library object you need to link against (-lboost_thread or sometimes -lboost_thread-mt).

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

Sidebar

Related Questions

I am trying to run LibreOffice's examples in a small Maven project. Netbeans does
I am trying to run a small javascript script. one of the parameters of
I was developing a small function when trying to run an enumerator across a
I am trying to write a small Java application that will let me run
I am trying run a program from a qmake .pro file which modifies the
Trying to run my program in FreeBSD OS, I have the following results: $
I am trying to build a small simple program with an image and a
Below is a small test case that demonstrates a problem that I am trying
I am trying to test UDP communications on a LAN. I have a small
So I have this small application of mine I'm trying to deploy using visual

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.