Search code examples
c++visual-studiovisual-studio-2019glfw

Unable to link 'GLFW' in Visual Studio in #include<GLFW/glwf3.h>


I am trying to include #include<GLFW/glfw3.h> to create a window in OpenGL, but am getting this error, Error (active) E1696 cannot open source file "GLFW/glfw3.h" OpenGL E:\OpenGL\src\Application.cpp 1

I have tried this solution, but am still getting this same issue.


Solution

  • I suggest you should check whether you are building a x86 project?

    enter image description here

    You need to make sure that you add the configuration properties to the correct build target and platform for your code.

    And I suggest you could select "All Platforms" for the platform and select "All Configurations" for the Configuration when changing the properties.

    enter image description here