First, thank you all for helping me troubleshoot the issue.
Second, I apologize for the ; in if statement. It is painful to have to use both C++ and Python at the same time. I did stare at the ; but just didn’t notice the grammar error – you know what I mean.
Last but not least, after removing the ; and make sure glfwInit() successfully accomplished the initialization work, the program still fails to proceed. This time the error occurs at glfwCreateWindow and callback caught the error and printed it out. The error is:
Error: GLX: GLX version 1.3 is required
If you don’t believe, this is the screenshot:
From this, two conclusions can be drawn:
(1) Correct execution of GLFW DOES rely on OpenGL version. For some reason the OpenGL version of the running environment of my program is only 1.1 or 1.2, so GLFW fails.
(2) Windows DOES NOT support modern OpenGL interface. What one of the answerers claims is just a propaganda, but not truth.
So, the problem is essentially solved. But I know I leave a lot to say, so you can skip the following off-topic stuff if you are interested. To repeat, Windows DOES NOT support modern OpenGL interface. If you don’t believe, connect through Windows Remote Desktop to a remote machine (Linux or Windows, whatever) in which OpenGL 4.5 is indeed installed and show me inside the remote desktop what the version of OpenGL is. You’ll never got 4.5 because nVidia’s driver that supports OpenGL 4.5 is replaced with a generic VGA driver which only supports OpenGL 1.1 (or 1.2, I don’t remember distinctly). The pitfall I fell into is that I had thought it is only a problem due to Microsoft’s poor programming. It is true, however, also for StarNet X-Win32 with which I am using to connect to a linux machine from Windows. For the reason I explained above, Windows doesn’t support OpenGL 4.5, so programs in X-win32 can only run on OpenGL 1.1. Then, since GLFW can correctly run only on OpenGL 1.3 and above, as its error message says, the program fails. At last, if you ask: why didn’t you sit right in front of a linux machine and run the code directly? May I ask you back: it is weekend and it is raining hard outside, can I work at home on my Windows desktop? Someone says: “I was lazy”.