Simon Pickles pravi:
Hi there,
I am using boost::thread for the first time as part of boost::asio. I am trying to compile the chat_client.cpp example.
When I uncomment the threading line, it won't link. Here's the line in question:
boost::thread t(boost::bind(&boost::asio::io_service::run, &io_service));
and heres the error:
chat_client.obj : error LNK2019: unresolved external symbol "public: __thiscall boost::thread::~thread(void)" (??1thread@boost@@QAE@XZ) referenced in function _main chat_client.obj : error LNK2019: unresolved external symbol "public: void __thiscall boost::thread::join(void)" (?join@thread@boost@@QAEXXZ) referenced in function _main chat_client.obj : error LNK2019: unresolved external symbol "public: __thiscall boost::thread::thread(class boost::function0
const &)" (??0thread@boost@@QAE@ABV?$function0@XV?$allocator@Vfunction_base@boost@@@std@@@1@@Z) referenced in function _main
I think I've done everything required. I've installed all the boost libraries with the Boost Consulting installer. I've added a few defines too:
#define BOOST_ALL_NO_LIB // For linking with boost.thread not supported by Â?BOOST_ALL_DYN_LINKÂ? #define BOOST_THREAD_USE_DLL // Verbose #define BOOST_LIB_DIAGNOSTIC
All to no avail. I'm not getting the 'boost-*.lib not found' message..... Just missing functions!
Anyone any advice?
Thanks
Simon
_________________________________________________________________ Play your part in making history - Email Britain! http://www.emailbritain.co.uk/
------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost Consulting installer doesnt build all libraries. You should build them by hand (with bjam)..