Re: [Boost-users] some warning C4273: inconsistent dll linkage
Hi Alex,
I still got some of warning C4273: inconsistent dll linkage like the following
----------------------
1> thread.cpp1>..\Boost\thread.cpp(186): warning C4273: 'boost::thread::thread' : inconsistent dll linkage1>
C:\3rdParty\BOOST_LIBRARY\boost-1.47.0\boost/thread/detail/thread.hpp(154)
: see previous definition of '{ctor}'1>..\Boost\thread.cpp(189): warning C4273: 'boost::thread::start_thread' : inconsistent dll linkage1>
C:\3rdParty\BOOST_LIBRARY\boost-1.47.0\boost/thread/detail/thread.hpp(120)
: see previous definition of 'start_thread'1>..\Boost\thread.cpp(200): warning C4273: 'boost::thread::thread' : inconsistent dll linkage1>
C:\3rdParty\BOOST_LIBRARY\boost-1.47.0\boost/thread/detail/thread.hpp(122)
: see previous definition of '{ctor}'1>..\Boost\thread.cpp(242): warning C4273: 'boost::thread::~thread' : inconsistent dll linkage1>
C:\3rdParty\BOOST_LIBRARY\boost-1.47.0\boost/thread/detail/thread.hpp(155)
: see previous definition of '{dtor}'
--------------
BTW, *after* I built boost thread libraries, I set #define BOOST_THREAD_DYN_LINK in boost-1.47.0/boost/boost/config/user.hpp, should I set BOOST_THREAD_DYN_LINK in this file *BEFORE* building boost thread libraries? Is it correct? Did I do something wrong?
Thank you for your great help!
Yan
--- On Fri, 11/18/11, code
Hi Boost Users,
When I compiled and linked my projects with Boost libraries, I got the
following warnings
...snip...
I want to link Boost.thread dll dynamically and other Boost libraries statically.
If I set #define BOOST_ALL_DYN_LINK, I could not generate
...snip... I didn't see any answer to this but apologies if its already been answered. #define BOOST_ALL_DYN_LINK Is for use within your own consuming code - use the bjam --link option to control which version of boost libraries are built eg in boost root do:- bjam variant=debug,release threading=multi link=shared stage --with-thread which would build boost-thread as dll (bjam --help to get more info on options) then: #define BOOST_THREAD_DYN_LINK In your code would use the dll version of boost.thread (any other boost libs would still be looking for static versions) HTH Alex
participants (1)
-
code