Re: Re: Question:Taglib on wince 6.0

苗澎锋 mpf125 at 126.com
Wed Dec 22 10:01:36 CET 2010


>The allocated memory might have been deleted in the
>meantime.


I see the source code of taglib, and class FileName is only used as the name of file. Why can not be replaced char* or wchar_t*?

2010-12-22 



苗澎锋 



发件人: Lukáš Lalinský 
发送时间: 2010-12-22  00:01:21 
收件人: taglib-devel 
抄送: 
主题: Re: Question:Taglib on wince 6.0 
 
2010/12/21 苗澎锋 <mpf125 at 126.com>:
>
> Hi ALL:
>
> I want to use taglib to extract id3 from media files on wince 6.0. When I
> use VS2005 to build taglib , it have many the same warnings as the follow:
> /toolkit\tfile.h : warning C4251: 'TagLib::FileName::m_name' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'TagLib::FileName'
> 1>        with
> 1>        [
> 1>            _Elem=char,
> 1>            _Traits=std::char_traits<char>,
> 1>            _Ax=std::allocator<char>
> 1>        ]
>
> How to resolve this? Has it bad effect to my Application when I use it?
>
> if I modify the class FileName to the followings:
>
> class TAGLIB_API FileName
>   {
>   public:
>     FileName(const wchar_t *name) : m_pwname(name) {}
>     FileName(const char *name) : m_pname(name) {}
>     operator const wchar_t *() const { return m_pwname; }
>     operator const char *() const { return m_pname; }
>   private:
>     const char* m_pname;
>     const wchar_t* m_pwname;
>   };
>
> ,the above warnings do not appear. But I don't know it is ok to use the
> Tablib.dll.
It isn't ok. The allocated memory might have been deleted in the
meantime. I think there are two possible options:
 - Export the STL classes.
 - Make it not require the exported classes. I think it complains
about the inline operators, so if we make these non-inline and compile
them into the DLL binary, it should probably go away.
Lukas
_______________________________________________
taglib-devel mailing list
taglib-devel at kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20101222/3bbd7c0d/attachment.htm 


More information about the taglib-devel mailing list