diff --git a/JSON/include/Poco/JSON/Array.h b/JSON/include/Poco/JSON/Array.h index 631160de61..68c8d55e13 100644 --- a/JSON/include/Poco/JSON/Array.h +++ b/JSON/include/Poco/JSON/Array.h @@ -26,8 +26,17 @@ namespace Poco { + namespace JSON { +class JSON_API Array; + +} + +// Explicitly instantiated shared pointer in JSON library +extern template class JSON_API Poco::SharedPtr; + +namespace JSON { class Object; diff --git a/JSON/include/Poco/JSON/Object.h b/JSON/include/Poco/JSON/Object.h index e7eae62495..502ce6f236 100644 --- a/JSON/include/Poco/JSON/Object.h +++ b/JSON/include/Poco/JSON/Object.h @@ -34,8 +34,17 @@ namespace Poco { + namespace JSON { +class JSON_API Object; + +} + +// Explicitly instatiated shared pointer in JSON library +extern template class JSON_API Poco::SharedPtr; + +namespace JSON { class JSON_API Object /// Represents a JSON object. Object provides a representation based on diff --git a/JSON/src/Array.cpp b/JSON/src/Array.cpp index 05f40503f6..5179c84222 100644 --- a/JSON/src/Array.cpp +++ b/JSON/src/Array.cpp @@ -20,6 +20,10 @@ using Poco::Dynamic::Var; +// Explicitly instatiated shared pointer in JSON library is required to +// have known instance of the pointer to be used with VarHolder when +// compiling with -fvisibility=hidden +template class Poco::SharedPtr; namespace Poco { namespace JSON { diff --git a/JSON/src/Object.cpp b/JSON/src/Object.cpp index 36c23e61f1..036f602ce8 100644 --- a/JSON/src/Object.cpp +++ b/JSON/src/Object.cpp @@ -19,8 +19,13 @@ using Poco::Dynamic::Var; +// Explicitly instatiated shared pointer in JSON library is required to +// have known instance of the pointer to be used with VarHolder when +// compiling with -fvisibility=hidden +template class Poco::SharedPtr; namespace Poco { + namespace JSON {