I'm having some difficulty understanding what I need to implement in
tss_cleanup_implemented when using boost.thread
I'm using
Windows
Borland C++ Builder 6 (bcc32 v5.6.4)
Roguewave stl
Static (.lib) build of boost.thread
In my project I #define BOOST_THREAD_USE_LIB
My first problem was a pair of unresolved externals - this seems to happen
occasionally with boost, bcb6 & roguewave. The missing definitions were
boost::thread::thread(boost::function0<void>&)
and
boost::detail::tss::init(boost::function1boost::function_base > *)
I resolved these by forcing the compiler to generate the relevant code by
#including the implementation definitions and creating a function which is never
called so:
#if (__BORLANDC__ >= 0x560) && defined(_USE_OLD_RW_STL)
#include
#include
#include
#include
void DummyFuncToGenerateTemplateSpecializations(void)
{
// This forces generation of
// boost::thread::thread(boost::function0<void>&)
boost::function0<void> A = NULL;
boost::thread B(A);
// This forces generation of
// boost::detail::tss::init(boost::function1boost::function_base > *)
// but has the consequence of requiring the deliberately undefined function
// tss_cleanup_implemented
boost::function1* C = NULL;
boost::detail::tss D(C);
}
But this then causes a call to the deliberately undefined
tss_cleanup_implemented so I get another unresolved external. I can't find any
info on the sort of thing I need to implement in tss_cleanup_implemented.
What should I be doing? Or I have gone wrong somewhere else?
Thanks in anticipation
Simon