With compilers like GCC you need to list files and libraries before the files and libraries they depend on. In the command-line above your source file is listed after the GLFW library and the system libraries. Since there is nothing listed after the source file that defines glfwInit
the link fails.
Moving the source file before the libraries should fix this problem.