[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    About Taglib for Symbian (Qt development)
From:       Hoài Linh Nguyễn <mrsherlock88 () gmail ! com>
Date:       2011-11-14 10:33:38
Message-ID: CADsPSZv2x8Bk2FubkLgMWJkM+q07SoS4XokAw_M73Uqd19445g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I use : Qt Creator in Window 7 x86. Visual Studio 9 2008, CMake 2.8.6,
latest taglib in Git.
I Generate in Cmake 2.8.6 like image attached, another hidden varialble are
default.
I build from Visual studio 9, first, I get tag.lib file and size is 520KB.
code I use:
QString filepath = fileInfo.absoluteFilePath();

        int fnLen = filepath.length();

        wchar_t* fnWs = new wchar_t[fnLen + 1];

        fnWs[fnLen] = 0;

        filepath.toWCharArray(fnWs);

         TagLib::FileRef f(filepath.constData());

        TagLib::FileName filename(fnWs);

//        TagLib::FileRef f(filename);

        delete [] fnWs;

         if(!f.isNull() && f.tag())

	{

                TagLib::Tag *tag = f.tag();

                this->artist	= TStringToQString(tag->artist());

                this->album	= TStringToQString(tag->album());

                this->title	= TStringToQString(tag->title());

 	}

With tag.lib in 520KB, only one error occurs is "cannot convert
parameter from QChar * to Taglib::FileName, no constructor found".
When change to:

//        TagLib::FileRef f(filepath.constData());

        TagLib::FileName filename(fnWs);

        TagLib::FileRef f(filename);

I get "unresolved external symbol".


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.

I try re-install CMake.


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.


Sorry for my bad English.

[Attachment #5 (text/html)]

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>&amp;&amp;<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>-&gt;<span style=" \
color:#800000;">artist</span><span style=" color:#c0c0c0;">	</span>=<span style=" \
color:#c0c0c0;"> </span>TStringToQString(tag-&gt;<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>-&gt;<span style=" \
color:#800000;">album</span><span style=" color:#c0c0c0;">	</span>=<span style=" \
color:#c0c0c0;"> </span>TStringToQString(tag-&gt;<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>-&gt;<span style=" \
color:#800000;">title</span><span style=" color:#c0c0c0;">	</span>=<span style=" \
color:#c0c0c0;"> </span>TStringToQString(tag-&gt;<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 \
&quot;cannot convert parameter from QChar * to Taglib::FileName, no constructor \
found&quot;. 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 &quot;unresolved external \
symbol&quot;.</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>

--000e0cd139ba65e9bd04b1af6786--


["only FileName.jpg" (image/jpeg)]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic