Getting started with boost: Linker error on boost::system::get_system_category
I'm just getting started with boost: - I'm using boost::asio - I'm on Vista x64, using Visual Studio 2008 SP1 - I built the x64 libs using bjam --address-mode=64 .... - I've got my code compiling (but not linking) - I got it pointed to the libs, so it finds the datetime, regex lib etc I get these errors: Error 84 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category@system@boost@@YAAEBVerror_category@12@XZ) Error 85 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_generic_category(void)" (?get_generic_category@system@boost@@YAAEBVerror_category@12@XZ) any tips? thx - Alex
Hi,
On Tue, Jun 30, 2009 at 11:14 PM, Alex Black
I get these errors:
Error 84 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" ( ?get_system_category@system@boost@@YAAEBVerror_category@12@XZ)
Error 85 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_generic_category(void)" ( ?get_generic_category@system@boost@@YAAEBVerror_category@12@XZ)
any tips?
I think the solution is: many boost libraries (those accessing operating system mainly, like filesystem, asio) themselves depend on boost_system library, so you need to link to boost_system library as well. Cheers, Boris thx
- Alex
Alex Black wrote:
I'm just getting started with boost: - I'm using boost::asio - I'm on Vista x64, using Visual Studio 2008 SP1 - I built the x64 libs using bjam --address-mode=64 ....
Did you actually use --address-model=64 command line option? If so, this is wrong, according to: http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html you should use address-model=64
- I've got my code compiling (but not linking) - I got it pointed to the libs, so it finds the datetime, regex lib etc
I get these errors:
Error 84 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category@system@boost@@YAAEBVerror_category@12@XZ)
Error 85 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_generic_category(void)" (?get_generic_category@system@boost@@YAAEBVerror_category@12@XZ)
any tips?
Define BOOST_LIB_DIAGNOSTIC to 1 when building your application, then examine the output, and then follow the procedure at: http://vladimir_prus.blogspot.com/2009/06/linking-101.html - Volodya
Yes, that is actually what I used, but since figured out what you pointed out that I had the wrong syntax. So, my libraries got built as 32bit, hence the linker problem. Thanks, - Alex -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: Wednesday, July 01, 2009 3:16 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Getting started with boost: Linker error onboost::system::get_system_category Alex Black wrote:
I'm just getting started with boost: - I'm using boost::asio - I'm on Vista x64, using Visual Studio 2008 SP1 - I built the x64 libs using bjam --address-mode=64 ....
Did you actually use --address-model=64 command line option? If so, this is wrong, according to: http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html you should use address-model=64
- I've got my code compiling (but not linking) - I got it pointed to the libs, so it finds the datetime, regex lib etc
I get these errors:
Error 84 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category@system@boost@@YAAEBVerror_category@12@XZ)
Error 85 error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_generic_category(void)" (?get_generic_category@system@boost@@YAAEBVerror_category@12@XZ)
any tips?
Define BOOST_LIB_DIAGNOSTIC to 1 when building your application, then examine the output, and then follow the procedure at: http://vladimir_prus.blogspot.com/2009/06/linking-101.html - Volodya _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Alex Black
-
Boris Dušek
-
Vladimir Prus