Error linking libxml

20 views
Skip to first unread message

john wilburrey

unread,
Feb 22, 2012, 9:36:14 AM2/22/12
to Google Data APIs Objective-C Client Library Discussion
I want to use GData API in my project for iOS
I've followed official notes on how to add GData to project Static
library was built successfully, I've added references to it and
headers folder
Than I put #import "GData.h into one of my source files and get
following error while building project:

libxml/tree.h : no such file or directory

In build settings - other linker flags I've specified -lxml2 (both for
project and target) In header search paths - /usr/include/libxml2 (no
misspellings, I've checked), both for project and target. To Build
Phases - Link binary with libraries I've added libxml2.dylib and Gdata
static library.

Greg Robbins

unread,
Feb 22, 2012, 5:32:38 PM2/22/12
to gdata-objec...@googlegroups.com
The error indicates that the header search path /usr/include/libxml2 is not present for the specific target (or debug/release configuration) being built.

Incidentally, there is no need to add libxml2.dylib to your project; the -lxml2 linker flag is sufficient.

john wilburrey

unread,
Feb 23, 2012, 10:56:35 AM2/23/12
to Google Data APIs Objective-C Client Library Discussion
It's present, I've checked. What else can cause this error?

john wilburrey

unread,
Feb 24, 2012, 10:00:26 AM2/24/12
to Google Data APIs Objective-C Client Library Discussion
I've got it working! What did the trick for me:
I've moved libxml2 folder to my folder's project
In build settings in User header search paths I've specified path to
libxml2 and set Always search user paths to YES.
Reply all
Reply to author
Forward
0 new messages