I am getting following errors.
libxml/tree.h no such file or directory
I have already added libxml2.dylib
to my pro
i tought i added wrongly, then i realize the problem is it not support arc, so check the support one here, life saver -> http://www.michaelbabiy.com/arc-compliant-gdataxml-library/
Another solution. do all the steps in header search path etc. and make sure your selected configuration in project in Project settings is the correct one. When you double click on project build settings ,you may be changing in Distribution settings, But you are trying to add header search path in "Debug" settings. So make sure you are in correct settings. or choose all settings
Also select "Always Search User Paths" to YES. In XCode 4.3.3 its by default NO
Adding libxml2 is a big, fat, finicky pain in the ass. If you're going to do it, do it before you get too far in building your project.
You need to add it in two ways:
Click on your target (not your project) and select Build Phases
.
Click on the reveal triangle titled Link Binary With Libraries
. Click on the +
to add a library.
Scroll to the bottom of the list and select libxml2.dylib
. That adds the libxml2 library to your project.
Now you have to tell your project where to look for it three more times.
Select the Build Settings tab
.
Scroll down to the Linking
section.
Under your projects columns double click on the Other Linker Flags
row.
Click the +
and add -lxml2
to the list.
Still more.
In the same tab, scroll down to the Search Paths
section.
Under your projects column in the Framework Search Paths
row add /usr/lib/libxml2.dylib
.
In the Header Search Paths
and the User Header Search Paths
row add $(SDKROOT)/usr/include/libxml2
.
In those last two cases make sure that path is entered in Debug and Release.
Under the Product
Menu select Clean
.
Then, if I were you (and lets face it, I probably am) I'd quit Xcode and walk away. When you come back and launch you should be good to go.
I found that with xCode 4.3.2 I had to enter $(SDKROOT)/usr/include/libxml2 into the Header Search field rather than simply /usr/include/libxml2
1) I added libxml file to the Build Phases.follow this link
2) I added Other Linker Flags as -ObjC
(For both project and test project targets)
3) I setup Header Search Path as "${SDKROOT}/usr/include/libxml2"
(Don't forget double quote in either side) (For both project and test project targets)
One of them will solve the issue. If not you have to apply all three of the above.