title: iphone - ".../libtool: can't locate file for: -lxml2"
body: <p>I have a 2 projects in an xcode workspace. One is a static library and the other one use the static library.</p>
  
  <p>In the static library I added the GDataXMLNode.h and GDataXMLNode.m files, which I use in the main project. The GDataXMLNode.h is a public file so it's visible in the main project. I also linked the target of both projects with libxml2.dylib. And I also include in the Header Search Paths and User Header Search Paths the location /usr/include/libxml2.</p>
  
  <p>Although these, I get an Apple Mach-O Librarian Error:</p>
  
  <pre><code>/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: can't locate file for: -lxml2
  /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: file: -lxml2 is not an object file (not allowed in a library)
  /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: file: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libxml2.dylib is a dynamic library, not added to the static library
  /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: file: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libxml2.dylib is a dynamic library, not added to the static library
  /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: file: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library
  /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: file: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library
  Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool failed with exit code 1
  </code></pre>
  
  <p>Do you know how can I fix this?</p>