|
Boost Users : |
Subject: [Boost-users] [context/coroutine] DLL link errors in VS2015
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-02-22 01:37:30
I'm migrating some existing code that uses Boost.Coroutine from VS2013
to VS2015 and from Boost 1.55 to Boost 1.60.
(Minor aside: coroutine<T>::push_type had an empty() method in 1.55
which has vanished in 1.60. This was mildly annoying but easily fixed
by using operator! instead.)
The code builds and runs fine as-is in VS2015 with Boost 1.60. However
I wanted to try migrating to Boost.Coroutine2 as well, since Coroutine
is deprecated. This however gives me the following errors:
t:\boost\boost_1_60_0\boost\context\execution_context.ipp(209): warning
C4251: 'boost::context::execution_context::ptr_': class
'boost::intrusive_ptr<boost::context::detail::activation_record>' needs
to have dll-interface to be used by clients of class
'boost::context::execution_context'
t:\boost\boost_1_60_0\boost\context\execution_context.ipp(54):
note: see declaration of
'boost::intrusive_ptr<boost::context::detail::activation_record>'
error LNK2001: unresolved external symbol "public: static class
boost::intrusive_ptr<struct boost::context::detail::activation_record>
boost::context::detail::activation_record::current_rec"
(?current_rec_at_activation_record_at_detail@context_at_boost@@2V?$intrusive_ptr_at_Uactivation_record_at_detail@context_at_boost@@@4_at_A)
I'm building with BOOST_ALL_DYN_LINK, in case that makes a difference.
Is this a known issue? Is it fixed in a later Boost release?
(FWIW, Boost.Coroutine also generates C4251 with a different symbol but
does not generate LNK2001, so the application still works.)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net