0

i m getting this error on some machines while compiling my project:

Undefined symbols for architecture armv6:
"_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

It compiles fine in simulator mode but not of devices (ios 4.3)

How to get rid of this?

Nico AD
  • 1,657
  • 4
  • 31
  • 51

3 Answers3

3

Add libxml2 framework to your target.

In Xcode 3, you do that by right clicking on Frameworks in the sidebar and choosing "Add Existing Framework". I don't know how you do it in Xcode 4, sorry.

From the MGTwitterEngine readme:

  1. Add libxml2.dylib in Other Frameworks. You'll find the library in:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/libxml2.dylib

  2. Add "$SDKROOT/usr/include/libxml2" as a Header Search Path in your Project Settings.

Amy Worrall
  • 16,250
  • 3
  • 42
  • 65
  • i ve already done that , otherwise i guess if would not compile in simulator , is there any specific action to do for devices? – Nico AD May 26 '11 at 12:05
1

I faced same issue some days ago, and i follow below steps:

  • You just need to add libxml2.dylib framework.
  • and add /usr/include/libxml2 in Header Search path.

It worked for me.

Hemant Singh Rathore
  • 2,153
  • 1
  • 24
  • 38
1

Replaced lib with libxml2.dylib by libxml2.2.dylib

Problem solved.

Alex Kulinkovich
  • 4,408
  • 15
  • 46
  • 50
Nico AD
  • 1,657
  • 4
  • 31
  • 51