mirror of
https://github.com/taglib/taglib.git
synced 2025-10-02 01:24:33 -04:00
Fix MSVC warning needs to have dll-interface (#1185)
Unfortunately, MSVC exports everything (not only public members) when __declspec(dllexport) is set at the class level via TAGLIB_EXPORT, which leads to many "needs to have dll-interface to be used by clients" 4251 warnings issued by MSVC, because the std::unique_ptr pimpls are exported too. As it is not possible to "unexport" private members, such a warning has to be explicitly suppressed for these cases or all public and protected class member now have to be exported for classes derived from a template (StringList, ByteVectorList, PropertyMap).
This commit is contained in:
@ -160,6 +160,7 @@ namespace TagLib {
|
||||
ByteVector xiphCommentData();
|
||||
|
||||
class FilePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FilePrivate> d;
|
||||
};
|
||||
} // namespace FLAC
|
||||
|
@ -118,6 +118,7 @@ namespace TagLib {
|
||||
void writePacket(unsigned int i, const ByteVector &packet);
|
||||
|
||||
class FilePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FilePrivate> d;
|
||||
};
|
||||
|
||||
|
@ -211,6 +211,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class PagePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<PagePrivate> d;
|
||||
};
|
||||
} // namespace Ogg
|
||||
|
@ -223,6 +223,7 @@ namespace TagLib {
|
||||
ByteVector lacingValues() const;
|
||||
|
||||
class PageHeaderPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<PageHeaderPrivate> d;
|
||||
};
|
||||
|
||||
|
@ -128,6 +128,7 @@ namespace TagLib {
|
||||
void read(bool readProperties);
|
||||
|
||||
class FilePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FilePrivate> d;
|
||||
};
|
||||
} // namespace Opus
|
||||
|
@ -105,6 +105,7 @@ namespace TagLib {
|
||||
void read(File *file);
|
||||
|
||||
class PropertiesPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<PropertiesPrivate> d;
|
||||
};
|
||||
} // namespace Opus
|
||||
|
@ -128,6 +128,7 @@ namespace TagLib {
|
||||
void read(bool readProperties);
|
||||
|
||||
class FilePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FilePrivate> d;
|
||||
};
|
||||
} // namespace Speex
|
||||
|
@ -100,6 +100,7 @@ namespace TagLib {
|
||||
void read(File *file);
|
||||
|
||||
class PropertiesPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<PropertiesPrivate> d;
|
||||
};
|
||||
} // namespace Speex
|
||||
|
@ -137,6 +137,7 @@ namespace TagLib {
|
||||
void read(bool readProperties);
|
||||
|
||||
class FilePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FilePrivate> d;
|
||||
};
|
||||
} // namespace Vorbis
|
||||
|
@ -121,6 +121,7 @@ namespace TagLib {
|
||||
void read(File *file);
|
||||
|
||||
class PropertiesPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<PropertiesPrivate> d;
|
||||
};
|
||||
} // namespace Vorbis
|
||||
|
@ -262,6 +262,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class XiphCommentPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<XiphCommentPrivate> d;
|
||||
};
|
||||
} // namespace Ogg
|
||||
|
Reference in New Issue
Block a user