mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Make tests work with BUILD_SHARED_LIBS=ON on Windows
This commit is contained in:
parent
304ab20174
commit
844f07d32d
@ -74,7 +74,7 @@ namespace TagLib {
|
||||
|
||||
typedef TagLib::List<AtomData> AtomDataList;
|
||||
|
||||
class Atom
|
||||
class TAGLIB_EXPORT Atom
|
||||
{
|
||||
public:
|
||||
Atom(File *file);
|
||||
@ -92,7 +92,7 @@ namespace TagLib {
|
||||
};
|
||||
|
||||
//! Root-level atoms
|
||||
class Atoms
|
||||
class TAGLIB_EXPORT Atoms
|
||||
{
|
||||
public:
|
||||
Atoms(File *file);
|
||||
|
@ -35,6 +35,11 @@
|
||||
#include "flacpicture.h"
|
||||
#include "taglib_export.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Explained at end of tpropertymap.cpp
|
||||
extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
#endif
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace Ogg {
|
||||
|
@ -177,3 +177,12 @@ const StringList &PropertyMap::unsupportedData() const
|
||||
{
|
||||
return unsupported;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// When building with shared libraries and tests, MSVC will fail with
|
||||
// "already defined in test_opus.obj" as soon as operator[] of
|
||||
// Ogg::FieldListMap is used because this will instantiate the same template
|
||||
// Map<String, StringList>. Therefore this template is instantiated here
|
||||
// and declared extern in the headers using it.
|
||||
template class TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
#endif
|
||||
|
@ -29,6 +29,11 @@
|
||||
#include "tmap.h"
|
||||
#include "tstringlist.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Explained at end of tpropertymap.cpp
|
||||
extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
|
||||
#endif
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
typedef Map<String,StringList> SimplePropertyMap;
|
||||
|
@ -110,6 +110,6 @@ namespace TagLib {
|
||||
* \related TagLib::StringList
|
||||
* Send the StringList to an output stream.
|
||||
*/
|
||||
std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l);
|
||||
std::ostream TAGLIB_EXPORT &operator<<(std::ostream &s, const TagLib::StringList &l);
|
||||
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* Returns whether or not zlib is installed and ready to use.
|
||||
*/
|
||||
bool isAvailable();
|
||||
bool TAGLIB_EXPORT isAvailable();
|
||||
|
||||
/*!
|
||||
* Decompress \a data by zlib.
|
||||
|
Loading…
Reference in New Issue
Block a user