I use : Qt Creator in Window 7 x86. Visual Studio 9 2008, CMake 2.8.6, latest taglib in Git.<div>I Generate in Cmake 2.8.6 like image attached, another hidden varialble are default.</div><div>I build from Visual studio 9, first, I get tag.lib file and size is 520KB. code I use:</div>
<div><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QString</span><span style=" color:#c0c0c0;"> </span>filepath<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>fileInfo.absoluteFilePath();
<pre style="margin-top: 0px; margin-bottom: 0px; "></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">int</span><span style=" color:#c0c0c0;"> </span>fnLen<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>filepath.length();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">wchar_t</span>*<span style=" color:#c0c0c0;"> </span>fnWs<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">wchar_t</span>[fnLen<span style=" color:#c0c0c0;"> </span>+<span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">1</span>];</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span>fnWs[fnLen]<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span>;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span>filepath.toWCharArray(fnWs);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">TagLib</span>::<span style=" color:#800080;">FileRef</span><span style=" color:#c0c0c0;"> </span>f(filepath.constData());</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">TagLib</span>::<span style=" color:#800080;">FileName</span><span style=" color:#c0c0c0;"> </span>filename(fnWs);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">TagLib::FileRef</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">f(filename);</span></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">delete</span><span style=" color:#c0c0c0;"> </span>[]<span style=" color:#c0c0c0;"> </span>fnWs;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">if</span>(!f.isNull()<span style=" color:#c0c0c0;"> </span>&&<span style=" color:#c0c0c0;"> </span>f.tag())</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">TagLib</span>::<span style=" color:#800080;">Tag</span><span style=" color:#c0c0c0;"> </span>*tag<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>f.tag();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span>-><span style=" color:#800000;">artist</span><span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>TStringToQString(tag-><span style="font-style: italic; ">artist</span>());</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span>-><span style=" color:#800000;">album</span><span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>TStringToQString(tag-><span style="font-style: italic; ">album</span>());</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span>-><span style=" color:#800000;">title</span><span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>TStringToQString(tag-><span style="font-style: italic; ">title</span>());</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span>}</pre><pre style="margin-top: 0px; margin-bottom: 0px; "><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;">With tag.lib in 520KB, only one error occurs is "cannot convert parameter from QChar * to Taglib::FileName, no constructor found". When change to:</span></font></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">TagLib::FileRef</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">f(filepath.constData());</span>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">TagLib</span>::<span style=" color:#800080;">FileName</span><span style=" color:#c0c0c0;"> </span>filename(fnWs);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">TagLib</span>::<span style=" color:#800080;">FileRef</span><span style=" color:#c0c0c0;"> </span>f(filename);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><pre style="margin-top: 0px; margin-bottom: 0px; "><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;">I get "unresolved external symbol".</span></font></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;"><br></span></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; ">
<font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;">After that, I re-generate with cmake, and re-build (try clean, or delete all file, re-extract from *.tar.gz file). But I get tag.lib with ~6MB, alway.</span></font></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;">I try re-install CMake.</span></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; ">
<font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;"><br></span></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; "><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;">Is there other way to construct FileName from QString ? Or fix that with new Constructor? Or I must generate with other config? Please help, I rather to use Taglib.</span></font></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; "><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;"><br></span></font></pre><pre style="margin-top: 0px; margin-bottom: 0px; ">
<font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;">Sorry for my bad English.</span></font></pre></pre></pre></pre></div>