Boost logo

Boost Users :

From: Vinodth Mohanam (vino_at_[hidden])
Date: 2004-11-05 15:49:22


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_at_boost@@QAE_at_ABV?$function0_at_XV?$allocator_at_Vfunction_base@
boost@@@_STL@@@1@@Z) referenced in function "public: unsigned int
__thiscall mok3::Abacus::Application::init(void)"
(?init_at_Application@Abacus_at_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

 

 



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