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:
g++ -time -v -I lib/glfw-3.1.2/include -o "bin/OpenGL Test" src/Main.cpp
My test code is this:
#include <iostream>
#include <GLFW/glfw3.h>
using namespace std;
int main() {
if(!glfwInit()) {
return 1;
}
glfwTerminate();
return 0;
}
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'.
What have I done wrong?