taglib on windows with visual studio

Roel roel_v at stack.be
Sun Jul 17 19:16:21 CEST 2005

Roel Vanhout wrote:
> Scott Wheeler wrote:
>>Recent versions of GCC like to have something similar (explicit symbol
>>visibility), so I'm not opposed to adding a macro for that in the near
> Aha very cool, I didn't know about that. For those interested, see eg 
> http://gcc.gnu.org/wiki/Visibility.

Ok well here is a small patch that adds a TAGLIB_EXPORT macro to every 
class that needs it for the samples to compile ok. (That means that 
there may be more classes that will need it, like those not covered in 
the examples). In this patch, TAGLIB_EXPORT is defined like this:
+  #define TAGLIB_EXPORT __attribute__ ((visibility("default")))
+  #define TAGLIB_EXPORT

So with no msvc'isms at all.

The other thing this patch changes is that it moves the #include of 
unistd.h to taglib.h. This means that for Unix builds it will be 
sometimes included when it's not needed but it's required for the idea 
of putting all windows-stuff in unistd.h to work.

The rest of the windows support is separate from the taglib sources and 
have a webpage on http://www.stack.be/~roel/blog/taglib-for-msvc/. I 
suggest we keep this separation until it's clear if there's a need for 
msvc support for taglib.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Url: http://mail.kde.org/pipermail/taglib-devel/attachments/20050717/14d526f1/TAGLIB_EXPORT.ksh

More information about the taglib-devel mailing list