<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.6049" name=GENERATOR>
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT color=#000080 size=2></FONT> </DIV>
<DIV><FONT
size=2>>The allocated memory might have been deleted in the
<DIV>>meantime.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>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*?</DIV></FONT></DIV>
<DIV><FONT color=#000080 size=2></FONT> </DIV>
<DIV><FONT color=#c0c0c0 size=2>2010-12-22 </FONT></DIV><FONT color=#000080
size=2>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT color=#c0c0c0 size=2><SPAN>苗澎锋</SPAN> </FONT></DIV>
<HR color=#b5c4df SIZE=1>
<DIV><FONT size=2><STRONG>发件人:</STRONG> Lukáš Lalinský </FONT></DIV>
<DIV><FONT size=2><STRONG>发送时间:</STRONG> 2010-12-22 00:01:21 </FONT></DIV>
<DIV><FONT size=2><STRONG>收件人:</STRONG> taglib-devel </FONT></DIV>
<DIV><FONT size=2><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT size=2><STRONG>主题:</STRONG> Re: Question:Taglib on wince 6.0
</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>
<DIV>2010/12/21 苗澎锋 <mpf125@126.com>:</DIV>
<DIV>></DIV>
<DIV>> Hi ALL:</DIV>
<DIV>></DIV>
<DIV>> I want to use taglib to extract id3 from media files on wince 6.0. When I</DIV>
<DIV>> use VS2005 to build taglib , it have many the same warnings as the follow:</DIV>
<DIV>> /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'</DIV>
<DIV>> 1> with</DIV>
<DIV>> 1> [</DIV>
<DIV>> 1> _Elem=char,</DIV>
<DIV>> 1> _Traits=std::char_traits<char>,</DIV>
<DIV>> 1> _Ax=std::allocator<char></DIV>
<DIV>> 1> ]</DIV>
<DIV>></DIV>
<DIV>> How to resolve this? Has it bad effect to my Application when I use it?</DIV>
<DIV>></DIV>
<DIV>> if I modify the class FileName to the followings:</DIV>
<DIV>></DIV>
<DIV>> class TAGLIB_API FileName</DIV>
<DIV>> {</DIV>
<DIV>> public:</DIV>
<DIV>> FileName(const wchar_t *name) : m_pwname(name) {}</DIV>
<DIV>> FileName(const char *name) : m_pname(name) {}</DIV>
<DIV>> operator const wchar_t *() const { return m_pwname; }</DIV>
<DIV>> operator const char *() const { return m_pname; }</DIV>
<DIV>> private:</DIV>
<DIV>> const char* m_pname;</DIV>
<DIV>> const wchar_t* m_pwname;</DIV>
<DIV>> };</DIV>
<DIV>></DIV>
<DIV>> ,the above warnings do not appear. But I don't know it is ok to use the</DIV>
<DIV>> Tablib.dll.</DIV>
<DIV></DIV>
<DIV>It isn't ok. The allocated memory might have been deleted in the</DIV>
<DIV>meantime. I think there are two possible options:</DIV>
<DIV></DIV>
<DIV> - Export the STL classes.</DIV>
<DIV> - Make it not require the exported classes. I think it complains</DIV>
<DIV>about the inline operators, so if we make these non-inline and compile</DIV>
<DIV>them into the DLL binary, it should probably go away.</DIV>
<DIV></DIV>
<DIV>Lukas</DIV>
<DIV>_______________________________________________</DIV>
<DIV>taglib-devel mailing list</DIV>
<DIV>taglib-devel@kde.org</DIV>
<DIV>https://mail.kde.org/mailman/listinfo/taglib-devel</DIV></FONT></DIV></BODY></HTML>