Legolas
Legolas

Reputation: 12335

Error adding libxml2 to project

I am getting this error:

/Users/AppleMacbook/Documents/Tab/Tab/../../../Downloads/GDataXMLNode.h:38:24: error: libxml/tree.h: No such file or directory

I have added these two properly:

/usr/include/libxml2

other linkers flags   -lxml2

Still I am getting an error saying that tree.h is not present. I opened that folder, it's there!

Could you please help me with this?

Upvotes: 1

Views: 2522

Answers (2)

Grady Player
Grady Player

Reputation: 14549

you need to specify an include path, in addition to a linker path -I/usr/include/libxml2/libxml, just specify the path (/usr/include/libxml2/libxml) in the build settings. enter image description here

Upvotes: 0

Nektarios
Nektarios

Reputation: 10371

Do you need /usr/include/ instead or in addition? I notice it's looking for libxml/tree.h but you're including /usr/include/libxml2 ?

Upvotes: 1

Related Questions