From: Pino Toscano Date: Sun, 18 Apr 2021 08:29:59 +0000 (+0200) Subject: [PATCH] Export YAML::detail::node::m_amount X-Git-Tag: archive/raspbian/0.7.0+dfsg-8+rpi1~1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=191ebeddbf36e5eb32ee7a88454a7fbda694cbe4;p=yaml-cpp.git [PATCH] Export YAML::detail::node::m_amount The internal header node/detail/node.h is included by public headers; YAML::detail::node is implemented in the header itself, and thus it gets inlined... except for its static m_amount class member, which is instantiated in the library only. Right now all the symbols of yaml-cpp are exported (nothing is hidden), so the linker will find node::m_amount in the yaml-cpp library. As solution/workaround, explicitly export YAML::detail::node::m_amount. Gbp-Pq: Name export-m_amount.patch --- diff --git a/src/node_data.cpp b/src/node_data.cpp index da2aefc..8f5422a 100644 --- a/src/node_data.cpp +++ b/src/node_data.cpp @@ -13,7 +13,7 @@ namespace YAML { namespace detail { -std::atomic node::m_amount{0}; +YAML_CPP_API std::atomic node::m_amount{0}; const std::string& node_data::empty_scalar() { static const std::string svalue;