Здравствуйте.
В очередной бесчисленный раз захотелось допилить один из старых проектов. И в очередной раз MinGW сошел с ума.
Есть код:
void glfw_Keyboard_callback_func(GLFWwindow* window, int key, int scancode, int action, int mods)
{
	if (action == GLFW_PRESS)
    {
        switch (key)
        {
                case GLFW_KEY_ESCAPE:
                case GLFW_KEY_ENTER:
                case GLFW_KEY_KP_ENTER:
                    std::cout << "Window will be closed soon..." << std::endl;
                    //glfwSetWindowShouldClose(window, GLFW_TRUE); //<<<<<<<
                    break;
        }
	}
}
С закомментированной строчкой компилируется. А если её раскомментировать, то начинает сходить с ума
||=== Build: Debug in OpenGL_GLFW_CodeBlocks (compiler: GNU GCC Compiler) ===|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(window.c.obj):window.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(window.c.obj):window.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `CreateDIBSection@24'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `CreateBitmap@20'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `DeleteObject@4'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `DeleteObject@4'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `DeleteObject@4'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `CreateRectRgn@16'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `DeleteObject@4'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_window.c.obj):win32_window.c|| more undefined references to `__mingw_free' follow|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `SwapBuffers@4'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `ChoosePixelFormat@8'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `SetPixelFormat@12'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `DescribePixelFormat@16'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `DescribePixelFormat@16'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `SetPixelFormat@12'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `DescribePixelFormat@16'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(wgl_context.c.obj):wgl_context.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(egl_context.c.obj):egl_context.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(egl_context.c.obj):egl_context.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(egl_context.c.obj):egl_context.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(egl_context.c.obj):egl_context.c|| more undefined references to `__mingw_free' follow|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(input.c.obj):input.c|| undefined reference to `__mingw_realloc'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(input.c.obj):input.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| more undefined references to `__mingw_free' follow|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_realloc'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(monitor.c.obj):monitor.c|| more undefined references to `__mingw_free' follow|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_monitor.c.obj):win32_monitor.c|| undefined reference to `CreateDCW@16'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_monitor.c.obj):win32_monitor.c|| undefined reference to `GetDeviceCaps@8'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_monitor.c.obj):win32_monitor.c|| undefined reference to `GetDeviceCaps@8'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_monitor.c.obj):win32_monitor.c|| undefined reference to `DeleteDC@4'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_monitor.c.obj):win32_monitor.c|| undefined reference to `__mingw_free'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_monitor.c.obj):win32_monitor.c|| undefined reference to `GetDeviceCaps@8'|
c:\mingw\bin\..\lib\gcc\mingw32\6.3.0\..\..\..\libglfw3.a(win32_monitor.c.obj):win32_monitor.c|| undefined reference to `GetDeviceCaps@8'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 4 warning(s) (0 minute(s), 1 second(s)) ===|
-lgdi32 подключен
Такое ощущение, что либа не та 
 Но что у них на сайте было, то и скачал 
 Чё ему тогда надо? 