With boost_1_43_0 built and installed from source on a clean ubuntu machine I get link errors when compiling my code:
.build/debug/magna/.singleunit.o: In function `recursive_mutex':
/usr/include/boost/thread/pthread/recursive_mutex.hpp:46: undefined reference to `boost::thread_resource_error::thread_resource_error()'
...
.build/debug/magna/.singleunit.o:/usr/include/boost/thread/pthread/recursive_mutex.hpp:57: more undefined references to `boost::thread_resource_error::thread_resource_error()' follow
collect2: ld returned 1 exit status
Looking at the library,
nm -C -D libboost_thread.so.1.43.0 | grep thread_resource_error
The solution in that case was to roll back from 1.41 to 1.40 of boost.
In my case, the link errors were resolved by preceding my inclusion of recursive_mutex by include boost thread exceptions:
#include <boost/thread/exceptions.hpp> // <--- add this line before
#include <boost/thread/recursive_mutex.hpp>
This seems sub-optimal to me. Shouldn't the recursive mutex header be self contained??
Am I missing something? I think in previous versions of boost thread, 1.38 at least, I can see that constructors for recursive_thread_error in the library & good for linking without extra include.
simon