Clement - 2019-04-14

I am trying to use the boost log feature. The version of boost is 1_70. I have built the boost libraries and configured VS2017 to point to the header and library directories. However, on linking, VS showed linking errors:

libboost_log_setup-vc141-mt-x64-1_70.lib(matches_relation_factory.obj) : error LNK2001: unresolved external symbol
... fatal error LNK1120: 6 unresolved externals

When building the boost libraries, I ran the following commands:
bootstrap
followed by:
bjam toolset=msvc-14.10 variant=debug,release threading=multi link=static

The compilation successfully completed.

Then I configured VS2017 to the boost header and library directories for x_64 for both Debug and Release configurations: Right click project -> Properties -> VC++ directories -> Include Directories

C:\boost_1_70_0

Right click project -> Properties -> VC++ directories -> Library Directories

C:\boost_1_70_0\stage\lib

Right click project -> Properties -> C/C++ -> General -> Additional Include Directories

C:\boost_1_70_0

Right click project -> Properties -> Linker -> General -> Additional Library Directories

C:\boost_1_70_0\stage\lib

I also searched for similar link errors for boost log in visual studio. The closest I found is that the boost library was built on 32 bit instead of 64bit. I checked C:\boost_1_70_0\stage\lib and there were both x32 and x64 lib files and the libboost_log_setup-vc141-mt-x64-1_70.lib was present.

The target machine is also x64. Under Linker -> Advanced -> Target Machine:

Machine X64

The code which produced the link error is:

#include <boost core.hpp="" log=""></boost>

include <boost log="" trivial.hpp=""></boost>

include <boost expressions.hpp="" log=""></boost>

include <boost file.hpp="" setup="" log="" utility=""></boost>

include <boost setup="" log="" common_attributes.hpp="" utility=""></boost>

void LogManager::VInitLogging()
{
boost::log::register_simple_filter_factory<boost::log::trival::severity_level,char>("Severity");

}</boost::log::trival::severity_level,char>

What is missing or not done correctly for the linking to fail?