What is boost log, how to get it and how to build it

后端 未结 5 963
梦毁少年i
梦毁少年i 2020-12-24 02:10

So I heard good things about boost log. This claims its existence:

http://boost-log.sourceforge.net/libs/log/doc/html/index.html

This is the tutorial:

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-24 02:29

    Unknown symbol in text_file_backend.cpp at line 1197 while building boost-log-1-1 with boost 1.51.0

    I am using Windows MSVC 2010, but I suspect that the problem I had may be common to other platforms as well. I copied the boost.log sources into the boost 1.51 source tree and ran bootstrap.bat and .\b2 as per the instructions. The build failed, complaining that get_generic_category() is an unknown symbol in text_file_backend.cpp at line 1197

    I changed line 1197 of text_file_backend.cpp so that it now reads

    system::error_code(system::errc::io_error, system::generic_category()));
    

    and I re-ran the build. The build worked.

    I hope this helps someone else who has trouble building the boost-log library with boost 1.51

    Please see http://www.boost.org/doc/libs/1_51_0/libs/system/doc/reference.html#Deprecated-names for more information about this change.

    Edit: I just tried again using the boost-log sources direct from Subversion trunk, and it compiled OK. So the solution is: ignore boost-log 1.1 and use the Subversion trunk.

提交回复
热议问题