I am using Xcode4.3.2 and mac lionOs and unable to add libxml2.dylib because it's inbuilt file so am added that by Build settings Build Settings: Search Paths:
HEADER_SEARCH_PATHS = $(SDKROOT)/usr/include/libxml2
But i am getting 8 Errors of MGTwitterEngine
on the iPhone Compiler Error:libxml2.dylib
Errors:
Undefined symbols for architecture i386:
"_xmlReaderForMemory", referenced from:
-[MGTwitterLibXMLParser initWithXML:delegate:connectionIdentifier:requestType:responseType:URL:] in MGTwitterLibXMLParser.o
"_xmlTextReaderIsEmptyElement", referenced from:
-[MGTwitterLibXMLParser _nodeValue] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _statusDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _userDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _hashDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterMessagesLibXMLParser _directMessageDictionaryForNodeWithName:] in MGTwitterMessagesLibXMLParser.o
"_xmlTextReaderNodeType", referenced from:
-[MGTwitterLibXMLParser _nodeValue] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _statusDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _userDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _hashDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterMessagesLibXMLParser _directMessageDictionaryForNodeWithName:] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMessagesLibXMLParser parse] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMiscLibXMLParser parse] in MGTwitterMiscLibXMLParser.o
...
"_xmlTextReaderValue", referenced from:
-[MGTwitterLibXMLParser _nodeValue] in MGTwitterLibXMLParser.o
"_xmlTextReaderRead", referenced from:
-[MGTwitterLibXMLParser _nodeValue] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _statusDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _userDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _hashDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterMessagesLibXMLParser _directMessageDictionaryForNodeWithName:] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMessagesLibXMLParser parse] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMiscLibXMLParser parse] in MGTwitterMiscLibXMLParser.o
...
"_xmlTextReaderConstName", referenced from:
-[MGTwitterLibXMLParser _statusDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _userDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _hashDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterMessagesLibXMLParser _directMessageDictionaryForNodeWithName:] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMessagesLibXMLParser parse] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMiscLibXMLParser parse] in MGTwitterMiscLibXMLParser.o
-[MGTwitterStatusesLibXMLParser parse] in MGTwitterStatusesLibXMLParser.o
...
"_xmlStrEqual", referenced from:
-[MGTwitterLibXMLParser _statusDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _userDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _hashDictionaryForNodeWithName:] in MGTwitterLibXMLParser.o
-[MGTwitterMessagesLibXMLParser _directMessageDictionaryForNodeWithName:] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMessagesLibXMLParser parse] in MGTwitterMessagesLibXMLParser.o
-[MGTwitterMiscLibXMLParser parse] in MGTwitterMiscLibXMLParser.o
-[MGTwitterStatusesLibXMLParser parse] in MGTwitterStatusesLibXMLParser.o
...
"_xmlFree", referenced from:
-[MGTwitterLibXMLParser initWithXML:delegate:connectionIdentifier:requestType:responseType:URL:] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsString] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsDate] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsInt] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsBool] in MGTwitterLibXMLParser.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
how i resolve this.. share your ideas.
In your target settings (select your project in file manager and then your target):
Build Phases
=> Link Binary With Libraries
;+
button at the left-bottomlibxml2.dylib
and select it (maybe you'll need to expand "iOS 5.1" or like that category pressing little black triangle to the right of folder icon)UPDATE: Check this ansver: LibXML2.dylib and Xcode4