Hi,
I came across this problem in using the threads package.
I used the following files:
boost_thread-vc71-mt-gdp-1_31.lib
boost_thread-vc71-mt-gdp-1_31.dll
boost_thread-vc71-mt-p-1_31.lib
boost_thread-vc71-mt-p-1_31.dll
While trying out a simple example from the test folder:
#include <boost/thread.hpp>
#include <boost/thread/xtime.hpp>
using namespace boost;
…………
…………
…………
void HelloWorld()
{
}
…………
…………
…………
// Test threads
boost::thread thrd(&HelloWorld);
thrd.join();
…………
…………
…………
The application gave the following link error:
Abacus error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::thread::thread(class boost::function0<void,class _STL::allocator<class boost::function_base> > const &)" (__imp_??0thread@boost@@QAE@ABV?$function0@XV?$allocator@Vfunction_base@boost@@@_STL@@@1@@Z) referenced in function "public: unsigned int __thiscall mok3::Abacus::Application::init(void)" (?init@Application@Abacus@mok3@@QAEIXZ)
The program works fine without any parameters to the constructor ( boost::thread thrd; ), but of course that’s not useful. If it were a syntax error it should be at compile-time, but there is no problem during compilation.
Also, if there is a patch for statically linking threads package, it would be appreciated if you could send it.
I am compiling the libraries with the following settings:
Boost_1_31_0> bjam –sTOOLS=vc7.1-stlport –sSTLPORT_PATH=… install
Thanks,
-Vino