Cannot open source file "GL/glew.h"

15,673

It's because your include directories should be pointing to where the header files are, not the .lib files.

Change your include directory to go to where the .h files are located, for me it's C:\...\glew-2.0.0\include\GL

The directories you currently have in it should instead go into Additional Library Directories located at linker->general in your options

Share:
15,673

Related videos on Youtube

Juan
Author by

Juan

Updated on July 05, 2022

Comments

  • Juan
    Juan almost 2 years

    I'm getting into OpenGL and Visual Studio, and just got this warning and couldn't find any possible solution. I've added both GLEW and GLFW Libraries to the include directory, and then again in the input section of the Linker menu, in the project's properties. Anyways, Visual Studio seems unable to find any of them.

    See these images - they explain it all.

    Include Directories:

    enter image description here

    Linker Input:

    enter image description here

    The Problem:

    enter image description here

    GLEW Directory:

    enter image description here

    GLFW Directory:

    enter image description here

    All image link together

  • Juan
    Juan over 7 years
    Worked! Thanks a lot man. Just a simple correction, I had to include '...\glew-2.0.0\include' instead of '...\glew-2.0.0\include\GL', but I suppose that's because I specified <GL/glew.h>. Thanks!