title: Compiling in Debug configuration works fine, but Release gives link errors
body: <p>I'm using GLFW (<code>glfw3.lib</code>, not <code>glfw3dll.lib</code>) and GLAD (<code>glad.c</code>) with Visual Studio 2017. Compiling in Debug configuration works fine, while Release builds throw out strange linker errors. These are &quot;unresolved external symbols&quot;:</p>
  <pre><code>1&gt;glad.obj : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_realloc
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_strncmp
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_free
  1&gt;glad.obj : error LNK2001: unresolved external symbol strstr
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_malloc
  1&gt;Game.obj : error LNK2001: unresolved external symbol __CxxFrameHandler3
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwSwapBuffers
  1&gt;Game.obj : error LNK2001: unresolved external symbol __imp_exit
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwGetKey
  1&gt;Game.obj : error LNK2001: unresolved external symbol &quot;void * __cdecl operator new(unsigned __int64)&quot; (??2@YAPEAX_K@Z)
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwTerminate
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwPollEvents
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwInit
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwSetWindowShouldClose
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwCreateWindow
  1&gt;Game.obj : error LNK2001: unresolved external symbol &quot;void __cdecl operator delete(void *,unsigned __int64)&quot; (??3@YAXPEAX_K@Z)
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwWindowHint
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwMakeContextCurrent
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwSetWindowTitle
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwGetProcAddress
  1&gt;Game.obj : error LNK2001: unresolved external symbol __std_terminate
  1&gt;Game.obj : error LNK2001: unresolved external symbol glfwWindowShouldClose
  1&gt;Game.obj : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo_noreturn
  1&gt;Game.obj : error LNK2001: unresolved external symbol __imp_getenv
  1&gt;LINK : error LNK2001: unresolved external symbol mainCRTStartup
  1&gt;C:\Users\User\Documents\Visual Studio Solutions\Order of the Stone\Order of the Stone\x64\Release\Order of the Stone.exe : fatal error LNK1120: 27 unresolved externals
  </code></pre>
  <p>Runtime library option is &quot;Multi-threaded DLL&quot; (&quot;Multi-threaded Debug DLL&quot; for Debug). I'm using the precompiled Windows GLFW binaries. Windows SDK is Windows 10 SDK.</p>
  <p>Any help is appreciated.</p>
  <hr />
  <h1>EDIT</h1>
  <p>I've checked the include directory for release, turns out it was for the wrong architecture (32 bit instead of 64 bit). But now it gives an another list of unresolved externals:</p>
  <pre><code>1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glad.obj : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(context.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(init.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol __security_check_cookie
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_realloc
  1&gt;glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __imp_realloc
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_strncmp
  1&gt;glfw3.lib(context.c.obj) : error LNK2001: unresolved external symbol __imp_strncmp
  1&gt;glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __imp_strncmp
  1&gt;glfw3.lib(vulkan.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(input.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp_free
  1&gt;glad.obj : error LNK2001: unresolved external symbol strstr
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf
  1&gt;glfw3.lib(context.c.obj) : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf
  1&gt;glad.obj : error LNK2001: unresolved external symbol __imp_malloc
  1&gt;Game.obj : error LNK2001: unresolved external symbol __CxxFrameHandler3
  1&gt;Game.obj : error LNK2001: unresolved external symbol __imp_exit
  1&gt;Game.obj : error LNK2001: unresolved external symbol &quot;void * __cdecl operator new(unsigned __int64)&quot; (??2@YAPEAX_K@Z)
  1&gt;Game.obj : error LNK2001: unresolved external symbol &quot;void __cdecl operator delete(void *,unsigned __int64)&quot; (??3@YAXPEAX_K@Z)
  1&gt;Game.obj : error LNK2001: unresolved external symbol __std_terminate
  1&gt;Game.obj : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo_noreturn
  1&gt;Game.obj : error LNK2001: unresolved external symbol __imp_getenv
  1&gt;LINK : error LNK2001: unresolved external symbol mainCRTStartup
  1&gt;glfw3.lib(context.c.obj) : error LNK2001: unresolved external symbol __imp_strstr
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp_strstr
  1&gt;glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(context.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(init.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck
  1&gt;glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(context.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(init.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __security_cookie
  1&gt;glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(vulkan.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(input.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp_calloc
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol _fltused
  1&gt;glfw3.lib(input.c.obj) : error LNK2001: unresolved external symbol _fltused
  1&gt;glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol _fltused
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol _fltused
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol _fltused
  1&gt;glfw3.lib(init.c.obj) : error LNK2001: unresolved external symbol __imp___stdio_common_vsprintf
  1&gt;glfw3.lib(init.c.obj) : error LNK2001: unresolved external symbol __chkstk
  1&gt;glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol memset
  1&gt;glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol memset
  1&gt;glfw3.lib(init.c.obj) : error LNK2001: unresolved external symbol memset
  1&gt;glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol memset
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol memset
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol memset
  1&gt;glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__strdup
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp__strdup
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __imp__strdup
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp_qsort
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __imp_qsort
  1&gt;glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol sqrt
  1&gt;glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol pow
  1&gt;glfw3.lib(vulkan.c.obj) : error LNK2001: unresolved external symbol strcmp
  1&gt;C:\Users\User\Documents\Visual Studio Solutions\Order of the Stone\Order of the Stone\x64\Release\Order of the Stone.exe : fatal error LNK1120: 28 unresolved externals
  </code></pre>
  <p>Note that 32 bit Release works fine, it's 64 bit Release build that is having these weird linker errors.</p>