Click to See Complete Forum and Search --> : STL Threads


muek
May 6th, 2006, 05:36 PM
Hi there,
does anyone here already use Boost:Threads??

I have download Boost library and with some sacrifice I compile Threads Lib using Visual Studio C++ 2003.


#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include <iostream>

int counter=0;

int main()
{
return 0;
}


But when I try to compile an example I get link errors

I have linked the library: libboost_thread-vc71-mt-gd-1_33_1.lib

threads error LNK2001: unresolved external symbol __RTC_Shutdown
threads error LNK2001: unresolved external symbol __RTC_InitBase
threads error LNK2019: unresolved external symbol ___CxxFrameHandler referenced in function __ehhandler$??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z
threads error LNK2019: unresolved external symbol __except_list referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z)
threads error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z)
threads error LNK2019: unresolved external symbol @_RTC_CheckStackVars@8 referenced in function __catch$??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z$0
threads error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
threads error LNK2001: unresolved external symbol "public: __thiscall bad_cast::bad_cast(class bad_cast const &)" (??0bad_cast@@QAE@ABV0@@Z)
threads error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
threads error LNK2001: unresolved external symbol "public: virtual __thiscall bad_cast::~bad_cast(void)" (??1bad_cast@@UAE@XZ)
threads error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall bad_cast::bad_cast(char const *)" (__imp_??0bad_cast@@QAE@PBD@Z) referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVlocale@0@@Z)
threads error LNK2019: unresolved external symbol __CxxThrowException@8 referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVlocale@0@@Z)
threads error LNK2001: unresolved external symbol _mainCRTStartup
threads fatal error LNK1120: 13 unresolved externals


I don't know what I'm doing wrong

muek

Marc G
May 7th, 2006, 03:48 AM
[ moved thread ]

muek
May 10th, 2006, 06:00 PM
Any ideias?