title: How to include an API
body: <p>For a Program I'm writing in C++, I need some squares in different colors to be drawn in a window and than disappear again. (Or be overdrawn)</p>
  
  <p>I'm using Xcode and I figured the easiest way to go is the <strong>Quartz 2D</strong> API, which seems to support exactly the graphics functionality I need.</p>
  
  <p>But now I'm lost. How do I link the API in my source code?</p>
  
  <p>All I learned in my lectures is that you can link a header file with something like <code>#include "myHeader.h"</code> to link the definition of self written classes, or <code>#include &lt;iostream&gt;</code> to include standard libraries.</p>
  
  <p>I'd really appreciate a way to use this specific API, or better yet, <em>a way to figure out how to link any given API.</em></p>
  
  <p>EDIT: At this point the code looks still like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
      return 0;
  }
  </code></pre>
  
  <p>And I'm still wondering what line of code comes after the first <code>#include</code></p>