title: Order of linked libraries in XCode
body: <p>In an XCode project I have linkend a library (libpng) and a framework (opencv). The framework already contains an older version of my library.</p>
  
  <p>Now when I go to XCode in "Link Binary With Libraies", if I put opencv first and libpng second, my code will use the what is in opencv, i.e. the older version.</p>
  
  <p>My question: Is it possible to know at compile time which version of libpng my project will use? I want to know for sure that even if somebody messes with the order my libraries are linked, I still use the proper one.</p>
  
  <p>What I tried already is to check with compile directives the version of libpng, something like this:</p>
  
  <pre><code>#if PNG_LIBPNG_VER_MINOR !=6
    #error "Wrong libpng version. Required is 1.6.9."
  #endif
  </code></pre>
  
  <p>But this is not a solution since the header where <code>PNG_LIBPNG_VER_MINOR</code> is declared is always the correct one. It's just in the code that the wrong methods might be called.</p>
  
  <p>Thanks!</p>