Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking error in C++ Boost library

I am new to C++ Boost library.

I already installed Boost 1.51 at BoostPro Computing website, both 32-bit and 64-bit versions (at two different folders (boost_1_51 and boost_1_51_x64).

I tried to use Visual Studio 2005 SP2 (on 32-bit Windows OS) to build for x64 and got the following errors:

error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ)
error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ)

I did the library linking in project configuration (boost paths for additional include and library directories). For example:

include: C:\Program Files\boost\boost_1_51_x64\

library: C:\Program Files\boost\boost_1_51_x64\lib

Can anyone can help me figure out the linking error as above?

like image 988
user746317 Avatar asked Feb 03 '26 01:02

user746317


1 Answers

From the comments above:

I solved the problem by re-installing the boost library (64-bit version). Maybe there were some errors during my last installation.

like image 87
Bo Persson Avatar answered Feb 04 '26 16:02

Bo Persson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!