Right click on the project name; click "Build options..."; go to "Linker settings"; click "Add"; find the library and add it.
Additionally, you may add some custom variables to ease the management of debug/release and 32/64bit target options. I'll leave that to you.
EDIT
Here is the erroneous code from error_code.hpp
:
# ifndef BOOST_SYSTEM_NO_DEPRECATED
inline const error_category & get_system_category() { return system_category(); }
inline const error_category & get_generic_category() { return generic_category(); }
inline const error_category & get_posix_category() { return generic_category(); }
static const error_category & posix_category = generic_category();
static const error_category & errno_ecat = generic_category();
static const error_category & native_ecat = system_category();
# endif
As you can see, defining BOOST_SYSTEM_NO_DEPRECATED
will disable it. I have tested that and it works. This compiles:
#define BOOST_SYSTEM_NO_DEPRECATED
#include <boost/system/error_code.hpp>
int main(void)
{
}