• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Boost Thread Linking error in Xcode 3.0 on OS X 10.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Boost Thread Linking error in Xcode 3.0 on OS X 10.5


  • Subject: Boost Thread Linking error in Xcode 3.0 on OS X 10.5
  • From: Sunwoo Park <email@hidden>
  • Date: Fri, 25 Jan 2008 14:49:57 -0800
  • Thread-topic: Boost Thread Linking error in Xcode 3.0 on OS X 10.5

Hi All,
I'm trying to compile & run a very simple Boost thread test program in Xcode
3.0 on OS X 10.5. Xcode could not successfully link the compiled code to
boost-1_34_1 thread libraries.  In Xcode Project Info panel, I set "Header
Search Paths" and "Library Search Path" to /opt/local/include/boost-1_34_1
and /opt/local/lib, respectively.  How can I set "-lboost_thread-mt" in
Xcode project pannel ?

BTW,  I could compile and link a similar test program using the following
command.
  g++ -o thTest.cpp thTest.cpp -I /usr/local/include/boost-1_34_1 -l
boost_thread-mt

I would appreciate for any help or suggestion from you.
FYI, I attach error messages produced by Xcode 3.0 here.
Regards,
Sunwoo

Building target “MTQueueTest” of project “MTQueueTest” with configuration
“Release” — (10 errors)
    Checking Dependencies
        cd /Users/sunwoo/Work/C++/MTQueueTest
    /Developer/usr/bin/g++-4.0 -o
/Users/sunwoo/Work/C++/MTQueueTest/build/MTQueueTest.build/Release/MTQueueTe
st.build/Objects-normal/ppc/MTQueueTest
-L/Users/sunwoo/Work/C++/MTQueueTest/build/Release -L/opt/local/lib
-F/Users/sunwoo/Work/C++/MTQueueTest/build/Release -filelist
/Users/sunwoo/Work/C++/MTQueueTest/build/MTQueueTest.build/Release/MTQueueTe
st.build/Objects-normal/ppc/MTQueueTest.LinkFileList -arch ppc
-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
Undefined symbols:
  "boost::thread::join()", referenced from:
      _main in main.o
      _main in main.o
  "boost::thread::~thread()", referenced from:
      _main in main.o
      _main in main.o
      _main in main.o
      _main in main.o
  "boost::lock_error::~lock_error()", referenced from:
      __ZN5boost10lock_errorD1Ev$non_lazy_ptr in main.o
  "typeinfo for boost::lock_error", referenced from:
      __ZTIN5boost10lock_errorE$non_lazy_ptr in main.o
  "boost::mutex::do_lock()", referenced from:
      boost::detail::thread::scoped_lock<boost::mutex>::lock() in main.o
  "boost::thread::thread(boost::function0<void,
std::allocator<boost::function_base> > const&)", referenced from:
      _main in main.o
      _main in main.o
  "boost::mutex::~mutex()", referenced from:
      queue<int>::~queue()in main.o
  "boost::mutex::do_unlock()", referenced from:
      boost::detail::thread::scoped_lock<boost::mutex>::unlock() in main.o
  "boost::lock_error::lock_error()", referenced from:
      boost::detail::thread::scoped_lock<boost::mutex>::lock() in main.o
      boost::detail::thread::scoped_lock<boost::mutex>::unlock() in main.o
  "boost::mutex::mutex()", referenced from:
      queue<int>::queue()in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
          "boost::thread::join()", referenced from:
              _main in main.o
              _main in main.o
          "boost::thread::~thread()", referenced from:
              _main in main.o
              _main in main.o
              _main in main.o
              _main in main.o
          "boost::lock_error::~lock_error()", referenced from:
              __ZN5boost10lock_errorD1Ev$non_lazy_ptr in main.o
          "typeinfo for boost::lock_error", referenced from:
              __ZTIN5boost10lock_errorE$non_lazy_ptr in main.o
          "boost::mutex::do_lock()", referenced from:
              boost::detail::thread::scoped_lock<boost::mutex>::lock() in
main.o
          "boost::thread::thread(boost::function0<void,
std::allocator<boost::function_base> > const&)", referenced from:
              _main in main.o
              _main in main.o
          "boost::mutex::~mutex()", referenced from:
              queue<int>::~queue()in main.o
          "boost::mutex::do_unlock()", referenced from:
              boost::detail::thread::scoped_lock<boost::mutex>::unlock() in
main.o
          "boost::lock_error::lock_error()", referenced from:
              boost::detail::thread::scoped_lock<boost::mutex>::lock() in
main.o
              boost::detail::thread::scoped_lock<boost::mutex>::unlock() in
main.o
          "boost::mutex::mutex()", referenced from:
              queue<int>::queue()in main.o
        ld: symbol(s) not found
        collect2: ld returned 1 exit status
Build failed (10 errors)
---------------------------------------------------------------------------
Sunwoo Park, Ph. D.
Computational and Systems Biology Postdoctoral Fellow
The Department of Bioengineering and Therapeutic Sciences,
University of California, San Francisco (UCSF)
513 Parnassus Avenue, HSE 1119, S-926 Box 0446, San Francisco, CA 94143
E-Mail: email@hidden  | Phone: 415/514-2008 | Fax: 415/514-2008 |


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Boost Thread Linking error in Xcode 3.0 on OS X 10.5
      • From: Thomas Engelmeier <email@hidden>
    • Re: Boost Thread Linking error in Xcode 3.0 on OS X 10.5
      • From: Rush Manbert <email@hidden>
  • Prev by Date: Re: Timing of Build Phases
  • Next by Date: Re: How does ibtool find plugins?
  • Previous by thread: Re: Class Browser not found in Xcode 2.5
  • Next by thread: Re: Boost Thread Linking error in Xcode 3.0 on OS X 10.5
  • Index(es):
    • Date
    • Thread