boost log 使用碰到的问题.
2011年12月30日
好不容易编译通过了Boost库和Log库,使用时却发现报如下错误:
1>------ Build started: Project: log, Configuration: Debug Win32 ------
1> stdafx.cpp
1> log.cpp
1>c:\program files\microsoft visual studio 10.0\vc\include\boost\log\sources\global_logger_st orage.hpp(136): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(371) : see declaration of 'sprintf'
1> c:\program files\microsoft visual studio 10.0\vc\include\boost\log\sources\global_logger_st orage.hpp(122) : while compiling class template member function 'void boost::log_mt_nt5::sources::aux::logger_singleton::init_instance(void)'
1> with
1> [
1> TagT=boost::log_mt_nt5::trivial::logger
1> ]
1> c:\program files\microsoft visual studio 10.0\vc\include\boost\log\trivial.hpp(100) : see reference to class template instantiation 'boost::log_mt_nt5::sources::aux::logger_singleton' being compiled
1> with
1> [
1> TagT=boost::log_mt_nt5::trivial::logger
1> ]
1>libboost_log-vc100-mt-gd-1_47.lib(trivial.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem3::path & __thiscall boost::filesystem3::path::replace_extension(class boost::filesystem3::path const &)" () referenced in function "class boost::filesystem3::path __cdecl boost::log_mt_nt5::trivial::aux::`anonymous namespace'::suggest_file_name(void)" ()
1>libboost_log-vc100-mt-gd-1_47.lib(trivial.obj) : error LNK2019: unresolved external symbol "private: static class std::codecvt const * & __cdecl boost::filesystem3::path::wchar_t_codecvt_facet(vo id)" () referenced in function "public: static class std::codecvt const & __cdecl boost::filesystem3::path::codecvt(void)" ()
1>libboost_log-vc100-mt-gd-1_47.lib(text_file_backe nd.obj) : error LNK2001: unresolved external symbol "private: static class std::codecvt const * & __cdecl boost::filesystem3::path::wchar_t_codecvt_facet(vo id)" ()
1>libboost_log-vc100-mt-gd-1_47.lib(trivial.obj) : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem
2011年12月30日
好不容易编译通过了Boost库和Log库,使用时却发现报如下错误:
1>------ Build started: Project: log, Configuration: Debug Win32 ------
1> stdafx.cpp
1> log.cpp
1>c:\program files\microsoft visual studio 10.0\vc\include\boost\log\sources\global_logger_st orage.hpp(136): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(371) : see declaration of 'sprintf'
1> c:\program files\microsoft visual studio 10.0\vc\include\boost\log\sources\global_logger_st orage.hpp(122) : while compiling class template member function 'void boost::log_mt_nt5::sources::aux::logger_singleton::init_instance(void)'
1> with
1> [
1> TagT=boost::log_mt_nt5::trivial::logger
1> ]
1> c:\program files\microsoft visual studio 10.0\vc\include\boost\log\trivial.hpp(100) : see reference to class template instantiation 'boost::log_mt_nt5::sources::aux::logger_singleton' being compiled
1> with
1> [
1> TagT=boost::log_mt_nt5::trivial::logger
1> ]
1>libboost_log-vc100-mt-gd-1_47.lib(trivial.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem3::path & __thiscall boost::filesystem3::path::replace_extension(class boost::filesystem3::path const &)" () referenced in function "class boost::filesystem3::path __cdecl boost::log_mt_nt5::trivial::aux::`anonymous namespace'::suggest_file_name(void)" ()
1>libboost_log-vc100-mt-gd-1_47.lib(trivial.obj) : error LNK2019: unresolved external symbol "private: static class std::codecvt const * & __cdecl boost::filesystem3::path::wchar_t_codecvt_facet(vo id)" () referenced in function "public: static class std::codecvt const & __cdecl boost::filesystem3::path::codecvt(void)" ()
1>libboost_log-vc100-mt-gd-1_47.lib(text_file_backe nd.obj) : error LNK2001: unresolved external symbol "private: static class std::codecvt const * & __cdecl boost::filesystem3::path::wchar_t_codecvt_facet(vo id)" ()
1>libboost_log-vc100-mt-gd-1_47.lib(trivial.obj) : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem