user746317
user746317

Reputation: 35

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?

Upvotes: 3

Views: 4003

Answers (2)

masterxilo
masterxilo

Reputation: 2778

I fixed this problem by manually adding "boost_system-vc120-mt-1_61.lib" (your version will be different) to the project. I was using the prebuilt windows binaries https://sourceforge.net/projects/boost/files/boost-binaries/

Upvotes: 0

Bo Persson
Bo Persson

Reputation: 92261

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.

Upvotes: 2

Related Questions