I'm guessing you need to call glfwInit()
before you do anything else.
From the glfw documentation:
int glfwInit (void)
This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before a program terminates GLFW should be terminated in order to free any resources allocated during or after initialization.
If this function fails, it calls glfwTerminate before returning. If it succeeds, you should call glfwTerminate before the program exits.
Additional calls to this function after successful initialization but before termination will succeed but will do nothing.
Returns GL_TRUE if successful, or GL_FALSE if an error occurred.