Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find headers for libxml2 and iOS 5.0 SDK / Xcode 4.2 (beta 3)

Tags:

libxml2

ios5

Seems quite a few people have encountered this issue on the official Apple Developer forums, yet didn't find a solution yet, therefore I want to try my luck here :)

With the iOS 5.0 SDK and Xcode 4.2 (beta 3) it seems something is messed up, the headers for libxml2 cannot be found. Yet as I navigate through the SDK directory, I clearly see a folder called libxml2/libxml with all the headers I need to import.

I wonder if anyone has found a solution for this. So far the only solution I found that might work is copying all headers into the project and then modifying the import path of the headers (removing the directory from the imports). As far as I could see this removes all errors, yet couldn't be bothered to change all import statements of libxml yet since I don't like this "fix".

like image 317
Wolfgang Schreurs Avatar asked Jul 23 '11 10:07

Wolfgang Schreurs


1 Answers

I found the solution in another answer on StackOverflow, I'll post it here for convenience.

Instead of using ${SDK_ROOT}/usr/include/libxml2 one should use "${SDK_DIR}"/usr/include/libxml2.

See: LibXML2.dylib and Xcode4

like image 120
Wolfgang Schreurs Avatar answered Sep 21 '22 12:09

Wolfgang Schreurs