I am attempting to statically link GLEW to Visual Studio 2017. I followed a video tutorial exactly, but I still got an error:
fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
I have no idea what could be causing it. Here are the steps I took to link GLEW:
- Put the folder named GLEW into a folder called dependencies in the solution directory
- Went to C/C++, General and under "Additional Include Directories," I added $(SolutionDir)Dependencies\GLEW\include, which, when I go to edit, evaluates to the correct path
- Went to Linker, General and under "Additional Library Directories," I added $(SolutionDir)Dependencies\GLEW\lib\Release\Win32, which also evaluates to the correct path
- Went to Linker, Input and under "Additional Dependencies," I added glew32s.lib
- Finally, I went to C/C++, Preprocessor and under "Preprocessor Definitions," I added GLEW_STATIC
I also did this same process with GLFW, and it worked perfectly, so I have no idea what the problem could be. I have checked and doublechecked the paths, so I am fairly certain that they are correct. Thank you in advance!
$(SolutionDir)Dependencies\GLEW\include
Did you verify that this folder exists? Is there a GL folder inside that? – drescherjmglew.h
file in that folder. The compiler is saying that there is not. Possibly did you edit the wrong configuration? Settings for each configuration (Debug, Release ...) are independent – drescherjm