+ Start a Discussion

zksforce and Xcode 4

Hi Everybody and Hi Simon,


I have just installed Xcode 4 Gm version, and opened a project created by Xcode 3.2.5 using zksforce framework.

I get one issue when I try to build, in zkParser.h.


Libxml/parser.h: No such file or directory

It should be something with headers path but I can not find what is the problem.


Thanks in advance.




Hi Danny,


I had a similar issue with a default project template in Xcode 4. I had to open up the project info, click on the build tab and add /usr/include/libxml2 to the 'Header Search Paths'.




Following on from this I had the same error, fixed that but now get:



Undefined symbols for architecture i386:
  "_xmlDocGetRootElement", referenced from:
      -[ZKElement initWithDocument:] in ZKParser.o
  "_xmlFreeDoc", referenced from:
      -[ZKElement dealloc] in ZKParser.o
  "_xmlNodeListGetString", referenced from:
      -[ZKElement stringValue] in ZKParser.o
  "_xmlGetNsProp", referenced from:
      -[ZKElement attributeValue:ns:] in ZKParser.o
  "_xmlGetProp", referenced from:
      -[ZKElement attributeValue:] in ZKParser.o
  "_xmlStrcmp", referenced from:
      -[ZKElement childElements:ns:checkNs:all:] in ZKParser.o
  "_xmlReadMemory", referenced from:
      +[ZKParser parseData:] in ZKParser.o
  "_xmlFree", referenced from:
      -[ZKElement stringValue] in ZKParser.o
      -[ZKElement attributeValue:ns:] in ZKParser.o
      -[ZKElement attributeValue:] in ZKParser.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

 Does anybody have any ideas what this means or how to fix it?







I haven't setup xcode4 yet, but those errors look like you're not linking to libxml2 correctly. This page has details (for xcode 3) https://github.com/superfell/zkSforce/wiki/Creating-a-new-project-that-uses-zkSforce