[prev in list] [next in list] [prev in thread] [next in thread]
List: taglib-devel
Subject: Trouble Using Compiling with TagLib
From: "Bhatnagar, Arvin" <arvin.bhatnagar () verizon ! com>
Date: 2011-09-30 13:52:40
Message-ID: CAAB41E8.B83F%arvin.bhatnagar () one ! verizon ! com
[Download RAW message or body]
Hi All,
I'm sure I must be doing something very very stupid being unable to compile my \
project with TagLib.
Environment:
Mac OS X 10.6.8 (64-bit)
Xcode 4.2 Build 4C104
TagLib 1.7
* Download TagLib 1.7
* Unpack TagLib 1.7
* Run the following cmake command:
cmake -DCMAKE_BUILD_TYPE=Release -DINSTALL_LIBS=ON -DBUILD_SHARED_LIBS=ON \
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/ \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
-DENABLE_STATIC=ON -DCMAKE_INSTALL_PREFIX="/usr/local"
* Run "make"
* Run "sudo make install"
Xcode Project Settings:
* Architectures – Standard 32/64-bit Intel
* Base SDK – Mack OS X 10.6
* Valid Architectures – i386 x86_64
* Compiler – Apple LLVM compiler 3.0
* Mac OS X Deployment Target – Mac OS X 10.6
* Header Search Paths - /usr/local/include/**
* Library Search Paths - /usr/local/lib/**
Xcode Code:
* I have .h and .mm files
* The .mm file has these #import's
#import <taglib/tag.h>
#import <taglib/tag_c.h>
#import <taglib/taglib.h>
* My function is just this:
+ (void) audioMetaData:(NSURL *)audioURL {
if ( audioURL && [audioURL isFileURL] ) {
TagLib_File *file = nil;
TagLib_Tag *tag = nil;
taglib_set_strings_unicode(YES);
file = taglib_file_new([[audioURL path] fileSystemRepresentation]);
tag = taglib_file_tag(file);
taglib_tag_free_strings();
taglib_file_free(file);
}
}
* When I compile this is the error received:
Undefined symbols for architecture x86_64:
"_taglib_set_strings_unicode", referenced from:
+[AudioMetaData audioMetaData:] in AudioMetaData.o
"_taglib_file_new", referenced from:
+[AudioMetaData audioMetaData:] in AudioMetaData.o
"_taglib_file_tag", referenced from:
+[AudioMetaData audioMetaData:] in AudioMetaData.o
"_taglib_tag_free_strings", referenced from:
+[AudioMetaData audioMetaData:] in AudioMetaData.o
"_taglib_file_free", referenced from:
+[AudioMetaData audioMetaData:] in AudioMetaData.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command /Developer/usr/bin/clang++ failed with exit code 1
I spent all day on this yesterday and thought I would ask the experts out on this \
list for any advice. So please if anyone can shed some light on this for me, I would \
be very grateful!
Thanks,
Arvin
[Attachment #3 (text/html)]
<html><head>
<meta http-equiv="Content-Type" content="text/html; \
charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; \
font-family: Calibri, sans-serif; "><div>Hi All,</div><div><br></div><div>I'm sure I \
must be doing something very very stupid being unable to compile my project with \
TagLib.</div><div><br></div><div><b>Environment:</b></div><div>Mac OS X 10.6.8 \
(64-bit)</div><div>Xcode 4.2 Build 4C104</div><div>TagLib 1.7</div><ul><li>Download \
TagLib 1.7</li><li>Unpack TagLib 1.7</li><li>Run the following cmake \
command:</li></ul><div>cmake -DCMAKE_BUILD_TYPE=Release -DINSTALL_LIBS=ON \
-DBUILD_SHARED_LIBS=ON -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/ \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
-DENABLE_STATIC=ON -DCMAKE_INSTALL_PREFIX="/usr/local"</div><ul><li>Run \
"make"</li><li>Run "sudo make install"</li></ul><div><b>Xcode \
Project Settings:</b></div><ul><li>Architectures – Standard 32/64-bit \
Intel</li><li>Base SDK – Mack OS X 10.6</li><li>Valid Architectures – i386 \
x86_64</li><li>Compiler – Apple LLVM compiler 3.0</li><li>Mac OS X Deployment Target \
– Mac OS X 10.6</li><li>Header Search Paths - /usr/local/include/**</li><li>Library \
Search Paths - /usr/local/lib/**</li></ul><div><br></div><div><b>Xcode \
Code:</b></div><ul><li>I have .h and .mm files</li><li>The .mm file has these \
#import's</li></ul><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \
Menlo; color: #d22f1b"><span style="color: #79492a">#import \
</span><taglib/tag.h></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: \
11.0px Menlo; color: #d22f1b"><span style="color: #79492a">#import \
</span><taglib/tag_c.h></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: \
11.0px Menlo; color: #d22f1b"><span style="color: #79492a">#import \
</span><taglib/taglib.h></p></div><div><br></div><ul><li>My function is just \
this:</li></ul><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \
Menlo">+ (<span style="color: #bb2da2">void</span>) audioMetaData:(<span \
style="color: #713eaa">NSURL</span> *)audioURL {</p> <p style="margin: 0.0px 0.0px \
0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" \
style="white-space:pre"> </span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: \
11.0px Menlo"><span class="Apple-tab-span" style="white-space:pre"> </span><span \
style="color: #bb2da2">if</span> ( audioURL && [audioURL <span style="color: \
#3d1e81">isFileURL</span>] ) {</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: \
11.0px Menlo"><span class="Apple-tab-span" style="white-space:pre"> </span><span \
style="color: #713eaa">TagLib_File</span> *file = <span style="color: \
#bb2da2">nil</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \
Menlo"><span class="Apple-tab-span" style="white-space:pre"> </span><span \
style="color: #713eaa">TagLib_Tag</span> *tag = <span style="color: \
#bb2da2">nil</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \
Menlo; min-height: 13.0px"><span class="Apple-tab-span" \
style="white-space:pre"> </span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; \
font: 11.0px Menlo; color: #3d1e81"><span style="color: #000000"><span \
class="Apple-tab-span" \
style="white-space:pre"> </span></span>taglib_set_strings_unicode<span style="color: \
#000000">(</span><span style="color: #bb2da2">YES</span><span style="color: \
#000000">);</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; \
color: #3d1e81"><span style="color: #000000"><span class="Apple-tab-span" \
style="white-space:pre"> </span>file = </span>taglib_file_new<span style="color: \
#000000">([[audioURL </span>path<span style="color: #000000">] \
</span>fileSystemRepresentation<span style="color: #000000">]);</span></p> <p \
style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span \
class="Apple-tab-span" style="white-space:pre"> </span></p> <p style="margin: 0.0px \
0.0px 0.0px 0.0px; font: 11.0px Menlo"><span class="Apple-tab-span" \
style="white-space:pre"> </span>tag = <span style="color: \
#3d1e81">taglib_file_tag</span>(file);</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; \
font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" \
style="white-space:pre"> </span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; \
font: 11.0px Menlo; color: #3d1e81"><span style="color: #000000"><span \
class="Apple-tab-span" \
style="white-space:pre"> </span></span>taglib_tag_free_strings<span style="color: \
#000000">();</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \
Menlo; color: #3d1e81"><span style="color: #000000"><span class="Apple-tab-span" \
style="white-space:pre"> </span></span>taglib_file_free<span style="color: \
#000000">(file);</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px \
Menlo; min-height: 13.0px"><span class="Apple-tab-span" \
style="white-space:pre"> </span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; \
font: 11.0px Menlo"><span class="Apple-tab-span" \
style="white-space:pre"> </span>}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; \
font: 11.0px Menlo">}</p></div><ul><li>When I compile this is the error \
received:</li></ul><div><p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: \
-12.0px; font: 11.0px Menlo">Undefined symbols for architecture x86_64:</p> <p \
style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px \
Menlo"> "_taglib_set_strings_unicode", referenced from:</p> <p \
style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px \
Menlo"> +[AudioMetaData audioMetaData:] in \
AudioMetaData.o</p> <p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; \
font: 11.0px Menlo"> "_taglib_file_new", referenced from:</p> <p \
style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px \
Menlo"> +[AudioMetaData audioMetaData:] in \
AudioMetaData.o</p> <p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; \
font: 11.0px Menlo"> "_taglib_file_tag", referenced from:</p> <p \
style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px \
Menlo"> +[AudioMetaData audioMetaData:] in \
AudioMetaData.o</p> <p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; \
font: 11.0px Menlo"> "_taglib_tag_free_strings", referenced from:</p> \
<p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px \
Menlo"> +[AudioMetaData audioMetaData:] in \
AudioMetaData.o</p> <p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; \
font: 11.0px Menlo"> "_taglib_file_free", referenced from:</p> <p \
style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px \
Menlo"> +[AudioMetaData audioMetaData:] in \
AudioMetaData.o</p> <p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; \
font: 11.0px Menlo">ld: symbol(s) not found for architecture x86_64</p> <p \
style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; font: 11.0px \
Menlo">clang: error: linker command failed with exit code 1 (use -v to see \
invocation)</p> <p style="margin: 0.0px 0.0px 0.0px 12.0px; text-indent: -12.0px; \
font: 11.0px Menlo">Command /Developer/usr/bin/clang++ failed with exit code \
1</p></div><div><br></div><div>I spent all day on this yesterday and thought I would \
ask the experts out on this list for any advice. So please if anyone can shed some \
light on this for me, I would be very \
grateful!</div><div><br></div><div>Thanks,</div><div>Arvin</div></body></html>
_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel
--===============8219040155886442133==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic