[Boost-bugs] [Boost C++ Libraries] #10023: using boost::log in shared runtime application

Subject: [Boost-bugs] [Boost C++ Libraries] #10023: using boost::log in shared runtime application
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-08 15:43:43


#10023: using boost::log in shared runtime application
--------------------------+-------------------------
 Reporter: scdev92@… | Owner: andysem
     Type: Bugs | Status: new
Milestone: Boost 1.56.0 | Component: log
  Version: Boost 1.55.0 | Severity: Showstopper
 Keywords: |
--------------------------+-------------------------
 It is not possible to use boost::log in a shared runtime application (/MDd
 or /MD), only in a static runtime application (/MTd or /MT). I cannot
 modify my application due to some other libraries. All the other boost
 stuff e.g. threads, condition vars, ... works! But not log!

 I also tested it with version 1.46.1. It was also not possible there.

 My source is:

 {{{
 [...]
 typedef
 boost::log::sinks::synchronous_sink<boost::log::sinks::text_ostream_backend
> text_sink;
 boost::shared_ptr< text_sink > sink( new text_sink );
 [...]
 }}}

 My errors are:

 {{{
 [...]
 1> Searching D:\work\work_3rdparty/boost_1_46_1/stage/win7x64vs10
 \libboost_thread-vc100-mt-gd-1_46_1.lib:
 1> Searching D:\work\work_3rdparty/boost_1_46_1/stage/win7x64vs10
 \libboost_date_time-vc100-mt-gd-1_46_1.lib:
 1> Searching D:\work\work_3rdparty/boost_1_46_1/stage/win7x64vs10
 \libboost_filesystem-vc100-mt-gd-1_46_1.lib:
 1> Searching D:\work\work_3rdparty/boost_1_46_1/stage/win7x64vs10
 \libboost_system-vc100-mt-gd-1_46_1.lib:
 1> Searching D:\work\work_3rdparty/boost_1_46_1/stage/win7x64vs10
 \libboost_log-vc100-mt-gd-1_46_1.lib:
 1> Searching C:\Program Files (x86)\Microsoft Visual Studio
 10.0\VC\lib\amd64\LIBCMTD.lib:
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __cdecl
 std::exception::exception(void)" (??0exception_at_std@@QEAA_at_XZ) already
 defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __cdecl
 std::exception::exception(char const * const &)"
 (??0exception_at_std@@QEAA_at_AEBQEBD@Z) already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __cdecl
 std::exception::exception(char const * const &,int)"
 (??0exception_at_std@@QEAA_at_AEBQEBDH@Z) already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __cdecl
 std::exception::exception(class std::exception const &)"
 (??0exception_at_std@@QEAA_at_AEBV01@@Z) already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __cdecl
 std::exception::~exception(void)" (??1exception_at_std@@UEAA_at_XZ) already
 defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual char const *
 __cdecl std::exception::what(void)const "
 (?what_at_exception@std@@UEBAPEBDXZ) already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __cdecl
 std::bad_cast::bad_cast(char const *)" (??0bad_cast_at_std@@QEAA_at_PEBD@Z)
 already defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __cdecl
 std::bad_cast::bad_cast(class std::bad_cast const &)"
 (??0bad_cast_at_std@@QEAA_at_AEBV01@@Z) already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __cdecl
 std::bad_cast::~bad_cast(void)" (??1bad_cast_at_std@@UEAA_at_XZ) already defined
 in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(invarg.obj) : error LNK2005: _invalid_parameter already
 defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _CrtSetCheckCount already
 defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(mlock.obj) : error LNK2005: _lock already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(mlock.obj) : error LNK2005: _unlock already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(atox.obj) : error LNK2005: atoi already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: exit already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _cexit already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _amsg_exit already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _initterm_e already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(dosmap.obj) : error LNK2005: _errno already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already
 defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(sprintf.obj) : error LNK2005: sprintf already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: __xi_a already defined in
 MSVCRTD.lib(cinitexe.obj)
 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: __xi_z already defined in
 MSVCRTD.lib(cinitexe.obj)
 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: __xc_a already defined in
 MSVCRTD.lib(cinitexe.obj)
 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: __xc_z already defined in
 MSVCRTD.lib(cinitexe.obj)
 1>LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)"
 (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(crt0.obj) : error LNK2005: mainCRTStartup already defined in
 MSVCRTD.lib(crtexe.obj)
 1>LIBCMTD.lib(errmode.obj) : error LNK2005: __set_app_type already defined
 in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(winxfltr.obj) : error LNK2005: _XcptFilter already defined
 in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(setlocal.obj) : error LNK2005: _configthreadlocale already
 defined in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(dbgrptw.obj) : error LNK2005: _CrtDbgReportW already defined
 in MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(_file.obj) : error LNK2005: _lock_file already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(_file.obj) : error LNK2005: _unlock_file already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(printf.obj) : error LNK2005: printf already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(fflush.obj) : error LNK2005: fflush already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 1>LIBCMTD.lib(tolower.obj) : error LNK2005: tolower already defined in
 MSVCRTD.lib(MSVCR100D.dll)
 [...]
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10023>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC