Hello all,
I am attempting to statically link to x64 bit GLFW in Visual Studio. I’ve added directories for glfw3.lib and glfw3.h, and set the runtime to Multithreaded and Multithreaded Debug. I’ve tried all the solutions I could find but I continue to get the same error messages:
1>LINK : warning LNK4098: defaultlib ‘MSVCRT’ conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(win32_joystick.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(wgl_context.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(egl_context.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(osmesa_context.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(win32_monitor.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(monitor.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(vulkan.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(win32_window.obj)’
1>LINK : warning LNK4217: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(init.obj)’ in function ‘terminate’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(window.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(input.obj)’
1>LINK : warning LNK4286: symbol ‘free’ defined in ‘libucrtd.lib(free.obj)’ is imported by ‘glfw3.lib(win32_init.obj)’
1>LINK : warning LNK4217: symbol ‘__stdio_common_vsprintf’ defined in ‘libucrtd.lib(output.obj)’ is imported by ‘glfw3.lib(init.obj)’ in function ‘_glfwInputError’
1>LINK : warning LNK4286: symbol ‘__stdio_common_vsprintf’ defined in ‘libucrtd.lib(output.obj)’ is imported by ‘glfw3.lib(win32_joystick.obj)’
1>LINK : warning LNK4217: symbol ‘strncmp’ defined in ‘libucrtd.lib(strncmp.obj)’ is imported by ‘glfw3.lib(context.obj)’ in function ‘_glfwRefreshContextAttribs’
1>LINK : warning LNK4286: symbol ‘strncmp’ defined in ‘libucrtd.lib(strncmp.obj)’ is imported by ‘glfw3.lib(input.obj)’
1>LINK : warning LNK4217: symbol ‘strncmp’ defined in ‘libucrtd.lib(strncmp.obj)’ is imported by ‘glfw3.lib(egl_context.obj)’ in function ‘_glfwCreateContextEGL’
1>LINK : warning LNK4217: symbol ‘strtoul’ defined in ‘libucrtd.lib(strtox.obj)’ is imported by ‘glfw3.lib(input.obj)’ in function ‘parseMapping’
1>LINK : warning LNK4217: symbol ‘qsort’ defined in ‘libucrtd.lib(qsort.obj)’ is imported by ‘glfw3.lib(monitor.obj)’ in function ‘refreshVideoModes’
1>LINK : warning LNK4217: symbol ‘qsort’ defined in ‘libucrtd.lib(qsort.obj)’ is imported by ‘glfw3.lib(win32_joystick.obj)’ in function ‘deviceCallback’
1>glfw3.lib(win32_joystick.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(wgl_context.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(egl_context.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(osmesa_context.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(win32_monitor.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(monitor.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(vulkan.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(init.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(window.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(input.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(win32_init.obj) : error LNK2001: unresolved external symbol __imp_calloc
1>glfw3.lib(window.obj) : error LNK2019: unresolved external symbol __imp_strncpy referenced in function glfwWindowHintString
1>glfw3.lib(input.obj) : error LNK2001: unresolved external symbol __imp_strncpy
1>glfw3.lib(win32_joystick.obj) : error LNK2001: unresolved external symbol __imp_strncpy
1>glfw3.lib(context.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function sscanf
1>glfw3.lib(input.obj) : error LNK2019: unresolved external symbol __imp_strcspn referenced in function glfwUpdateGamepadMappings
1>glfw3.lib(input.obj) : error LNK2019: unresolved external symbol __imp_strspn referenced in function glfwUpdateGamepadMappings
1>glfw3.lib(input.obj) : error LNK2019: unresolved external symbol __imp_realloc referenced in function glfwUpdateGamepadMappings
1>glfw3.lib(win32_monitor.obj) : error LNK2001: unresolved external symbol __imp_realloc
1>glfw3.lib(monitor.obj) : error LNK2001: unresolved external symbol __imp_realloc
1>C:\Users\Lourdas\Desktop\games\Spark\x64\Debug\Spark.exe : fatal error LNK1120: 6 unresolved externals
1>Done building project “Spark.vcxproj” – FAILED.
This happens with 3.2 and 3.3 on VS 2015, 17 and 19
Any help is greatly appreciated,
-Aristides