Simon Fell > Its just code > zlib / libxml from cocoa
Monday, December 4, 2006
I hunted and hunted for some hint of this, both zlib and libxml are in the standard xcode install, I couldn't however workout how to link to the libraries. Instinctively, I tried dragging the libraries to the Linked Frameworks folder, which didn't work, neither did dragging into the link binary with libraries step in the target definition. I finally found enough pointers to tryout setting -lz and -lxml2 additional linker flags (-l for link and z for libz.dylib, and -l for link and xml2 for libxml2.dylib, the prefixed lib and suffix .dylib not being needed). I guess this is obivous to everyone else, but not me, so this post is for any other lost souls trying to track this own down. Also, because libxml is actually burried in a libxml2 directory, you'll need to add /usr/include/libxml2 to your header seach paths.