I am using Visual Studio for C++. I have tried to link GLFW in Visual Studio. The steps I went through are as follows:
- Specify include directories under VC++ properties.
- Specify the library directories under VC++ properties.
- Add the .lib file in additional dependencies under Linker -> Input
Visual Studio recognises the header #include <GLFW/glfw3.h>
and recognised glfwInit()
but when glfwInit()
is called it causes the build to fail. I get this build error:
LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
I then also get some unresolved externals:
LNK2019 unresolved external symbol __imp__vsnprintf referenced in function __glfwInputError
LNK2001 unresolved external symbol __imp__vsnprintf
LNK2019 unresolved external symbol __imp__sscanf referenced in function _parseVersionString
LNK2001 unresolved external symbol __imp___vsnprintf
LNK1120 3 unresolved externals