libxml and iPhone

Discussion in 'iOS Programming' started by jsnuff1, Sep 15, 2008.

  1. jsnuff1 macrumors 6502a

    Joined:
    Oct 4, 2003
    Location:
    NY
    #1
    Im creating a program that has a lot of C++ code back-end which is heavily dependent on the libxml framework.

    Is there any reason why this framework would not work with the iPhone? Everything compiles and runs fine, but when I try and load a XML file with this framework I get a failed to load I/O warning.

    Anyone that knows about this framework chime in?
     
  2. acanby macrumors newbie

    Joined:
    Aug 9, 2008
    #2
    i had a similar issue, but i can assure you it works perfectly once you know where to look for your files - it took me ages to come across this thread: http://forums.macrumors.com/showthread.php?t=499671. the important part i put below

    basically you have to tell the program where the file is located, without declaring it statically. if you go and have a look where the project is run from, /Users/xyz/Library/Application Support/iPhone Simulator/user/Applications you will be able to find your application (depending on how many apps you have installed in the simulator) and your xml file should show up in the documents folder. if its not, then you are doing something wrong
     
  3. jsnuff1 thread starter macrumors 6502a

    Joined:
    Oct 4, 2003
    Location:
    NY
    #3
    hey thanks for the reply, i figured that part out. Have you got your program to work successfully on the device with this framework? Everything works on the simulator for me, but once I try to compile for the device I get linker errors from the framework. If you got it working on the device can you tell me how you went about adding the framework with no linker errors?
     
  4. acanby macrumors newbie

    Joined:
    Aug 9, 2008
    #4
    yeah its working fine on the device... i set it up a while back but here goes

    go get info on the project, and go to the build tab

    im assuming that if its working in the simulator you have already added the -lxml2 to the "other linker flags"?

    and the other bit is for the heading labeled "header search paths" put "/usr/include/libxml2/**" (from memory the ** sets it to be recursive)

    and if that doesnt work, check here for the right path for libxml on the device: http://discussions.apple.com/thread.jspa?threadID=1442488&tstart=284
     

Share This Page