taglib fails to compile with MS VC++ 2010

Brett Hoyle kickbits at gmail.com
Mon Jan 24 08:20:34 CET 2011


http://msdn.microsoft.com/en-us/library/b0084kay.aspx

Check for MSVC 2010:
#if (_MSC_VER >= 1600)

#endif



-----Original Message-----
From: Lukáš Lalinský [mailto:lalinsky at gmail.com] 
Sent: Monday, 24 January 2011 4:38 PM
To: taglib-devel at kde.org
Subject: Re: taglib fails to compile with MS VC++ 2010

2011/1/22 Lukáš Lalinský <lalinsky at gmail.com>:
> On Sat, Jan 22, 2011 at 7:49 PM, Tanguy Krotoff <tkrotoff at gmail.com> wrote:
>> I don't get any warning when compiling mpegheader.cpp with this patch 
>> under Mac OS X SL (64 bits) with gcc 4.2.1 and -Wall -Wextra I don't 
>> remember to get a warning neither with MinGW under Windows XP (32 bits).
>> Once compiled TagLib works fine as usual on both OS.
>> I didn't try with an old version of Visual C++ (don't have one 
>> installed)
>
> I specifically wanted somebody to test it on MS VC++ 2008 or older, 
> because I do not have such environment available. While it would be 
> nice to get rid of some warnings in a specific compiler, it doesn't 
> make much sense to me if it introduces warnings in some other 
> compiler. If that's the case, then I'd prefer to have some c++0x 
> #ifdef to work-around the warnings in both versions.
>
> Anyway, I've committed the patch. If anybody can test with an old 
> MSVC, it would be great. Thanks.

As I expected, the batch broke compilation or some other compiler, specifically Sun Studio on Solaris --
http://my.cdash.org/viewBuildError.php?buildid=146859 . I've changed the unsigned long long cast to unsigned long. If anybody can find a macro that can be used to identify C++0x or MSVC2010, I'll conditionally make it cast to unsigned long long.

Lukas
_______________________________________________
taglib-devel mailing list
taglib-devel at kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel



More information about the taglib-devel mailing list