Static compilation of taglib_c / wchar_t setting

Lukáš Lalinský lalinsky at
Fri Oct 2 13:41:38 CEST 2009

On Fri, Oct 2, 2009 at 1:28 PM, Lars Wehmeyer <Lars.Wehmeyer at> wrote:
> we believe we have found a minor issue in both the CMakeLists.txt and in
> tag_c.cpp which prevents taglib_c from being built as a static library
> by simply setting ENABLE_STATIC. Please review the patches below. They
> appear to be working for both Windows and Linux.

I've found this while working on ENABLE_STATIC, but I wasn't sure
whether to include it. The thing is that if you build the C bindings
in static mode, you need to link the application to the standard C++
libraries (for example, the patch as it is fails to build the C

> Also, when using a statically compiled taglib lbrary in conjunction with
> boost stuff and wide characters using Visual Studio 2005, we got linker
>  errors. They are caused bsy a define in the top-level CMakeLists.txt:
> /Zc:wchar_t-)
> It seems the changed default behavior of VS2005 to have wchar_t
> activated leads to an incompatibility with the precompiled boost
> libraries we are using. Maybe this should go somewhere in the FAQ
> (couldn't find any mention of this issue)-

I'm not sure why these options are there. I think changing the default
behavior of wchar_t is a bad idea, so I'll remove it. The next TagLib
release is not going to be binary compatible anyway, so that shouldn't
be a problem.

Lukas Lalinsky
lalinsky at

More information about the taglib-devel mailing list