diff --git a/taglib/ogg/xiphcomment.h b/taglib/ogg/xiphcomment.h index ca70a71f..2edbde2d 100644 --- a/taglib/ogg/xiphcomment.h +++ b/taglib/ogg/xiphcomment.h @@ -37,7 +37,7 @@ #ifdef _MSC_VER // Explained at end of tpropertymap.cpp -extern template class TAGLIB_EXPORT TagLib::Map; +extern template class TagLib::Map; #endif namespace TagLib { diff --git a/taglib/toolkit/tpropertymap.cpp b/taglib/toolkit/tpropertymap.cpp index 07fab3b1..61807742 100644 --- a/taglib/toolkit/tpropertymap.cpp +++ b/taglib/toolkit/tpropertymap.cpp @@ -205,5 +205,9 @@ PropertyMap &PropertyMap::operator=(const PropertyMap &other) // Ogg::FieldListMap is used because this will instantiate the same template // Map. Therefore this template is instantiated here // and declared extern in the headers using it. -template class TagLib::Map; +// Suppress warning "needs to have dll-interface to be used by clients", +// in the template, TAGLIB_EXPORT cannot be used on the members, therefore +// the private implemenation is exported too, but not accessible by clients. +#pragma warning(suppress: 4251) +template class TAGLIB_EXPORT TagLib::Map; #endif diff --git a/taglib/toolkit/tpropertymap.h b/taglib/toolkit/tpropertymap.h index c8683fac..98242008 100644 --- a/taglib/toolkit/tpropertymap.h +++ b/taglib/toolkit/tpropertymap.h @@ -31,7 +31,7 @@ #ifdef _MSC_VER // Explained at end of tpropertymap.cpp -extern template class TAGLIB_EXPORT TagLib::Map; +extern template class TagLib::Map; #endif namespace TagLib {