I'm trying to follow a simple tutorial of Boost::Thread (ver 1.4-3) in VS 2008:
#include <boost/thread/thread.hpp>
void Func()
{
// Do something
}
void main()
{
boost::thread _thrd(&Func);
_thrd.join();
....
}
During compilation it produces this error:
Error 1 fatal error LNK1104: cannot open file 'libboost_thread-vc90-mt-gd-1_43.lib' CConsole
which I have to resolve by adding #define BOOST_ALL_NO_LIB
.
However, it gives me another error:
Error 3 fatal error LNK1120: 2 unresolved externals
C:\xx\Documents\Visual Studio 2008\Projects\CConsole\Debug\CConsole.exe
Error 1 error LNK2019: unresolved external symbol "public: __thiscall boost::thread::~thread(void)" (??1thread@boost@@QAE@XZ) referenced in function _wmain CConsole.obj
Error 2 error LNK2019: unresolved external symbol "private: void __thiscall boost::thread::start_thread(void)" (?start_thread@thread@boost@@AAEXXZ) referenced in function "public: __thiscall boost::thread::thread<void (__cdecl*)(void)>(void (__cdecl*)(void),struct boost::thread::dummy *)" (??$?0P6AXXZ@thread@boost@@QAE@P6AXXZPAUdummy@01@@Z) CConsole.obj
Does anyone know how to resolve the issue?
Thanks.