Imported from the Apple Support Forums via the Wayback Machine 🔗
I am trying to work with an xml file on the iPhone. It looks like the best way is to use libxml2.
The sample application "SeismicXML" uses libxml2 without problems. however I cannot seem to import libxml2 into my own project.
I am currently including libxml2 by clicking Action->Add->Existing Frameworks and selecting /Developer/Platforms/Aspen.platform/Developer/SDKs/Aspen1.2.sdk/usr/lib/libxml2 .2.dylib.
When I add an #import <libxml/xmlmemory.h> statement in my header file it gives an error saying there is no such file or directory.
Is there something else I have to do in order to use libxml2.
Thank you in advance for any help I have been struggling with this issue for the past day.
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thank you very much William_D.
My project now compiles perfectly. It is kinda frustrating because I had gone through all the build settings of SeismicXML to get them to match my own and I did not see any differences. Even now when I go back to the SeismicXML project and look at the 'Header Search Paths' option I see it does not have anything.
Oh well, adding the 'Header Search Path' that you suggested works and now I can continue programming, thanks again and marked as solved.
0
parkinglothustler·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I encountered the same issue and was able to fix by adding the header path.
I also noticed that SeismicXML does not have this setting.
The only difference I was able to see is that SeismicXML has this for Base SDK:
Imported from the Apple Support Forums via the Wayback Machine 🔗
the include path does seem to work -- but has anyone come across the following message:
in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/l ibobjc.A.dylib, file is not of required architecture
it does not give this error when building for the phone, just the simulator build?
0
ScotShinderman·
Imported from the Apple Support Forums via the Wayback Machine 🔗
of course, realized what was wrong just as i hit send -- the path is platform/target dependent. so there's Developer/Platforms/iPhoneOS.platform and Developer/Platforms/iPhoneSimulator.platform/.../iPhoneSimulator2.0sdk/usr/incl ude/libxml2
this is much easier to find and fix in a text editor than in the projectSettings dialog box
0
sabernar·
Imported from the Apple Support Forums via the Wayback Machine 🔗
So, what did you do to fix the problem?
0
binjaja·
Imported from the Apple Support Forums via the Wayback Machine 🔗
HELP... I can't get libxml in my iphone project. I read the posts , and followed the instructions but it didn't work. I must be doing something very stupid... This is what I did (in XCODE it says Simulator|Debug in the Overview)
1. click on Action->Add->Existing Frameworks
2. I see a lib directory and I then highlight libxml2.2.dylib and click ADD
3. A window pops up with Reference Type: Default and Text Encoding: Unicode (UTF-8) There are 3 other items that are NOT clicked (copy items into destination,recursively create groups, create folder reference)
4.I click ADD and the libxml2.2.dylib appears in the Frameworks folder
5. I click project-> Edit Project Settings
6. On the Header Search Paths line I click on the empty value and enter
/usr/include/libxml2/
7. In one of my files I add
#include <libxml/xmlreader.h>
HELP! It doesn't work I keep getting "no such file or directory"
0
binjaja·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Scratch that last cry for help.. I figured out I that I was changing the wrong build file. When I selected Project->Edit Project Settings , it brought up Project "MyProjectName" Info file and when I filled in Header Search Paths it did nothing. I reread the post which said to right click on the Target->GetInfo which brings up the Target "MyProjectName" Info file. By changing the Header Search Paths in that file , I got my project to compile. Whats the difference between the two? I figure one is for debug, one for release or something like that. Can anyone point me to documentation explaining what they are for?