title: Compile GLFW code with g++
body: <p>I am just starting to get into C++ coding, specifically OpenGL (GLFW at this stage). I am using MinGW, and compiling my code using a batch file:</p>
  
  <pre><code>g++ -time -v -I lib/glfw-3.1.2/include -o "bin/OpenGL Test" src/Main.cpp
  </code></pre>
  
  <p>My test code is this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;GLFW/glfw3.h&gt;
  
  using namespace std;
  
  int main() {
      if(!glfwInit()) {
          return 1;
      }
      glfwTerminate();
      return 0;
  }
  </code></pre>
  
  <p>To me this seems like it should compile and run correctly, but it throws errors at the two GLFW functions, claiming that they are 'undefined references'.</p>
  
  <p>What have I done wrong?</p>