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

List:       taglib-devel
Subject:    Re: Getting started with taglib in Xcode
From:       Luká¹ Lalinský <lalinsky () gmail ! com>
Date:       2013-10-30 8:45:22
Message-ID: CAGUtLj_533RX3H52cUQa+hmMgpU-Rym77jYi4by8Xc14RGeKsA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Oct 30, 2013 at 9:02 AM, Søren Krogh Neigaard
<soeren@neigaard.com>wrote:

> Hi again,
>
> I am struggling getting started using taglib in Xcode.
>
> I think I have done the right thing here..? I have build taglib with the
> following:
>
>
> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=**10.6
> -DCMAKE_OSX_ARCHITECTURES="**i386;x86_64" -DENABLE_STATIC=ON
> -DCMAKE_INSTALL_PREFIX="/**Users/soeren/dev-libs/build"
>
> and ofcourse make and make install. I then added libtag.a and libtag_c.a
> to my Xcode project and set the "User Header Search Paths" to
> "/Users/soeren/dev-libs/build/**include". Is this correct?
>

Based on my limited experience building for OS X, I think it would be
easier to use a framework with Xcode. You can use cmake to build a TagLib
framework with -DBUILD_FRAMEWORK=ON (see the INSTALL file).


> But now I dont know how to use this from Objective C? If i make this
> import:
>
> #import <taglib/taglib.h>
>
> I get a compiler error, but I can do this:
>
> #import "taglib/taglib.h"
>
> But I can not figure out what to import to be able to use
> "TagLib::FileRef" in my code. Do I need to make some kind of wrapper to use
> this in Objective C, or what do I do now? Please get me in the right
> direction, using a C++ library from Xcode/ObjC is totally new for me.


With this I can't help directly, I have no experience with Obj-C, but have
a look at some of Stephen's code that uses TagLib:

https://github.com/sbooth/Play/blob/master/Audio/Metadata/Readers/MP3MetadataReader.mm

Lukas

[Attachment #5 (text/html)]

<div dir="ltr">On Wed, Oct 30, 2013 at 9:02 AM, Søren Krogh Neigaard <span \
dir="ltr">&lt;<a href="mailto:soeren@neigaard.com" \
target="_blank">soeren@neigaard.com</a>&gt;</span> wrote:<br><div \
class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi \
again,<br> <br>
I am struggling getting started using taglib in Xcode.<br>
<br>
I think I have done the right thing here..? I have build taglib with the \
following:<div class="im"><br> <br>
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=<u></u>10.6 \
-DCMAKE_OSX_ARCHITECTURES=&quot;<u></u>i386;x86_64&quot; -DENABLE_STATIC=ON \
-DCMAKE_INSTALL_PREFIX=&quot;/<u></u>Users/soeren/dev-libs/build&quot;<br>


<br></div>
and ofcourse make and make install. I then added libtag.a and libtag_c.a to my Xcode \
project and set the &quot;User Header Search Paths&quot; to \
&quot;/Users/soeren/dev-libs/build/<u></u>include&quot;. Is this correct?<br>

</blockquote><div><br></div><div>Based on my limited experience building for OS X, I \
think it would be easier to use a framework with Xcode. You can use cmake to build a \
TagLib framework with -DBUILD_FRAMEWORK=ON (see the INSTALL file).</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 But now I dont know how to use this from Objective C? If i make this import:<br>
<br>
#import &lt;taglib/taglib.h&gt;<br>
<br>
I get a compiler error, but I can do this:<br>
<br>
#import &quot;taglib/taglib.h&quot;<br>
<br>
But I can not figure out what to import to be able to use &quot;TagLib::FileRef&quot; \
in my code. Do I need to make some kind of wrapper to use this in Objective C, or \
what do I do now? Please get me in the right direction, using a C++ library from \
Xcode/ObjC is totally new for me.</blockquote>

<div><br></div><div>With this I can&#39;t help directly, I have no experience with \
Obj-C, but have a look at some of Stephen&#39;s code that uses \
TagLib:</div><div><br></div><div><a \
href="https://github.com/sbooth/Play/blob/master/Audio/Metadata/Readers/MP3MetadataRea \
der.mm">https://github.com/sbooth/Play/blob/master/Audio/Metadata/Readers/MP3MetadataReader.mm</a><br>


</div><div><br></div><div>Lukas</div></div></div></div>



_______________________________________________
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