I downloaded an open source epub reader called AePubReader its working fine.But When i tried to integrate with my application in xcode 4.6 it shows lots of errors due to the ARC .So i selected those files and set "-fno-objc-arc" flag .But after that it shows error like #include <libxml/tree.h> not found![this is the error i got ][1]
$(SDK_DIR)"/usr/include/libxml2 i added this line then that problem is solved but after that it shows "43 Errors" something like " Apple Mach-O Linker Error"most of them related to xml files
My error message
Undefined symbols for architecture i386: "_htmlParseDoc", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_htmlReadMemory", referenced from: -[CXHTMLDocument initWithXHTMLData:encoding:options:error:] in CXHTMLDocument.o "_xmlAddChild", referenced from: -[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] in CXMLDocument_CreationExtensions.o -[CXMLElement(CXMLElement_CreationExtensions) addChild:] in CXMLElement_CreationExtensions.o -[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o "_xmlAddPrevSibling", referenced from: -[CXMLDocument(CXMLDocument_CreationExtensions) insertChild:atIndex:] in CXMLDocument_CreationExtensions.o "_xmlCopyNode", referenced from: -[CXMLNode copyWithZone:] in CXMLNode.o
"_xmlDocDumpFormatMemory", referenced from:
-[CXMLDocument description] in CXMLDocument.o
"_xmlDocDumpMemory", referenced from: -[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o "_xmlDocGetRootElement", referenced from: -[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o -[CXMLDocument rootElement] in CXMLDocument.o "_xmlDocSetRootElement", referenced from: +[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o "_xmlFree", referenced from: -[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o -[CXMLDocument description] in CXMLDocument.o "_xmlFreeDoc", referenced from: -[CXMLDocument dealloc] in CXMLDocument.o "_xmlFreeNode", referenced from: -[CXMLNode dealloc] in CXMLNode.o "_xmlGetCharEncodingName", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o "_xmlGetLastError", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o -[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlNewDoc", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) document] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
"_xmlNewNode", referenced from: +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:] in CXMLNode_CreationExtensions.o +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o "_xmlNewNs", referenced from: +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o "_xmlNewPI", referenced from: +[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] in CXMLNode_CreationExtensions.o "_xmlNewText", referenced from: -[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o "_xmlNodeDumpOutput", referenced from: -[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlNodeSetContent", referenced from: -[CXMLNode(CXMLNode_CreationExtensions) setStringValue:] in CXMLNode_CreationExtensions.o "_xmlOutputBufferClose", referenced from: -[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlOutputBufferCreateIO", referenced from: -[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlOutputBufferFlush", referenced from: -[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlParseDoc", referenced from: -[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o "_xmlReadMemory", referenced from: -[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o "_xmlResetLastError", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o -[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o "_xmlSetNs", referenced from: -[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] in CXMLElement_CreationExtensions.o "_xmlStrcmp", referenced from: -[CXMLElement elementsForName:] in CXMLElement.o -[CXMLElement elementsForLocalName:URI:] in CXMLElement.o -[CXMLElement attributeForName:] in CXMLElement.o -[CXMLElement attributeForLocalName:URI:] in CXMLElement.o -[CXMLElement namespaceForPrefix:] in CXMLElement.o -[CXMLElement resolvePrefixForNamespaceURI:] in CXMLElement.o "_xmlXPathEvalExpression", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathFreeContext", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathFreeObject", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathNewContext", referenced from: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathRegisterNs", referenced from: -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
"_htmlParseDoc", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_htmlReadMemory", referenced from:
-[CXHTMLDocument initWithXHTMLData:encoding:options:error:] in CXHTMLDocument.o
"_xmlAddChild", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] in CXMLDocument_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) addChild:] in CXMLElement_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlAddPrevSibling", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) insertChild:atIndex:] in CXMLDocument_CreationExtensions.o
"_xmlCopyNode", referenced from:
-[CXMLNode copyWithZone:] in CXMLNode.o
"_xmlDocDumpFormatMemory", referenced from:
-[CXMLDocument description] in CXMLDocument.o
"_xmlDocDumpMemory", referenced from:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
"_xmlDocGetRootElement", referenced from:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
-[CXMLDocument rootElement] in CXMLDocument.o
"_xmlDocSetRootElement", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_xmlFree", referenced from:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
-[CXMLDocument description] in CXMLDocument.o
"_xmlFreeDoc", referenced from:
-[CXMLDocument dealloc] in CXMLDocument.o
"_xmlFreeNode", referenced from:
-[CXMLNode dealloc] in CXMLNode.o
"_xmlGetCharEncodingName", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_xmlGetLastError", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlNewDoc", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) document] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
"_xmlNewNode", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewNs", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
"_xmlNewPI", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewText", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlNodeDumpOutput", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlNodeSetContent", referenced from:
-[CXMLNode(CXMLNode_CreationExtensions) setStringValue:] in CXMLNode_CreationExtensions.o
"_xmlOutputBufferClose", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlOutputBufferCreateIO", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlOutputBufferFlush", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlParseDoc", referenced from:
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
"_xmlReadMemory", referenced from:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlResetLastError", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
"_xmlSetNs", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] in CXMLElement_CreationExtensions.o
"_xmlStrcmp", referenced from:
-[CXMLElement elementsForName:] in CXMLElement.o
-[CXMLElement elementsForLocalName:URI:] in CXMLElement.o
-[CXMLElement attributeForName:] in CXMLElement.o
-[CXMLElement attributeForLocalName:URI:] in CXMLElement.o
-[CXMLElement namespaceForPrefix:] in CXMLElement.o
-[CXMLElement resolvePrefixForNamespaceURI:] in CXMLElement.o
"_xmlXPathEvalExpression", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathFreeContext", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathFreeObject", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathNewContext", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
"_xmlXPathRegisterNs", referenced from:
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You have to add "libz.dylib" and "libxml2.dylib" to the "Link Binary With Libraries" items in the "Build Phases" of the target.