Hi,
I'm trying to link an app using boost threads and stlport on gcc
2.95(linux), and its coming back with an undefined reference:
Debug/threadex.o: In function `threadex::go(void)':
.../threadex.cpp:37: undefined reference to
`boost::thread::thread(boost::function0boost::function_base > const &)'
and the offending code is
new boost::thread(threadex_caller(this));
where theadex_caller looks like this
struct threadex_caller
{
threadex_caller(threadex*);
void operator()();
};
I think the problem is the allocator template parameter of boost::function0,
a clue is given if I don't link against the pthread library, I get the
following undefined reference (amongst others)
Debug/libboost_thread.a(thread.o): In function
`boost::thread::thread(boost::function0boost::function_base > const
&)':
.../src/thread.cpp:112: undefined reference to `pthread_create'
where you can see that the thread::thread function expects a function0 with
an _STL::allocator<>, not a plain allocator<>
I also think that the problem is that the thread.hpp isn't getting the
namespace mapping function, but why?
TIA
Sam