|
Boost Users : |
From: Tristan King (tristan.king_at_[hidden])
Date: 2004-07-06 22:49:25
i've written a little test to see if i've installed boost properly on my mac
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
#include <iostream>
void simple_thread( boost::shared_ptr<int> p )
{
std::cout << (*p) << std::endl;
}
int main (int argc, char * const argv[]) {
boost::thread_group threads;
for ( int i = 0 ; i < 5 ; i++ )
{
boost::shared_ptr<int> p( new int(i) );
threads.create_thread( boost::bind( &simple_thread, p ) );
}
threads.join_all( );
return 0;
}
in xcode (a C++ Tool project) this compiles fine, however on runtime i
get the following error:
ZeroLink: unknown symbol '__ZN5boost12thread_groupC1Ev'
boost_test has exited due to signal 6 (SIGABRT).
using g++ i get the following errors (ignoring warnings)
g++ main.cpp -o boost_test -I/usr/local/include/boost-1_31 -L/usr/local/lib
ld: Undefined symbols:
boost::thread_group::create_thread(boost::function0<void,
std::allocator<boost::function_base> > const&)
boost::thread_group::join_all()
boost::thread_group::thread_group[in-charge]()
boost::thread_group::~thread_group [in-charge]()
i originally built boost using the command line
sudo bjam -sTOOLS=darwin install
can anyone help me with what i am missing here?
thanks
--Tristan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net