Cannot open source file "glew.h" and "freeglut.h" - c++

I am trying to run a project and I have to first include glew.h and freeglut.h. I open Visual Studio, go to Project - > Properties ->c++->General -> Additional Include Directories I write "C:\Users\malvi\Desktop\DevOgl\Common\glew\include\GL;C:\Users\malvi\Desktop\DevOgl\Common\freeglut\include\GL", which are the absolute paths of the glew.h and freeglut.h files, but when I try to run it, it says E1696 "cannot open source file glew.h" and E1696 "cannot open source file freeglut.h". At solution explorer I have algebra.cpp,main.cpp and mesh.cpp under source files and algebra.h,mesh.h and shaders.h under header files.
Any idea what might be going wrong? Thank you!

Related

fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory

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!
Sounds like you're doing
#include <GL/glew.h>
When you should be doing
#include <glew.h>
Is glew.h directly in the win32 folder? Or is there a further "GL" folder?

How to reference header files in visual studio 2017 project

I have downloaded and tried to build The oxygine engine project with VS 2017 Community. The stringutils.cpp file from it gives me the following when I try to compile:
C1083: Cannot open include file: 'SDL_stdinc.h': No such file or directory
hovering the #include statement it says cannot open source file 'SDL_stdinc.h'
I checked
Properties->C/C++->General->Additional Include Directories
and it references the path the header files are in. I have even added another path representing the absolute path. I tried a different folder, a different download of the header files, all to no avail.
What do I need to do to get this right?
Is there any reason for a header to not work? (version mismatch or something)
Is a header not working if the corresponding dll or lib is missing?
If so, how do I know it is found by VS?
The problem was the path for oxygine in the oxigine project properties was setup like this ..\..\..\..\SDL\include\ but had to be setup like that ..\..\SDL\include\

OpenCV Include error "Cannot open source file"

I am new in OpenCV. I had install Visual Studio 2015 and OpenCV3.1.
I had included all the dependencieas and include file location.
But I am getting error:
cannot open source file"opencv2/imgproc/imgproc.hpp"
cannot open source file"opencv2/imgcodecs.hpp"
cannot open source file"opencv2/highgui/highgui.hpp"
Anyone can help whats is the problem?
In the additional Include directories the path should be something like .. 'C:\OpenCV-3.0.0\opencv\build\include' once whether it is
#include "opencv2/imgcodecs.hpp" or #include "opencv2/imgcodecs/imgcodecs.hpp" because in the version i am using header file inside the folder imgcodecs.

Error in including header file in .h file but not in .cpp

With Visual Studio 2013 I'm writing a Dynamic Library and I need to use some third-party libraries. Each library comes in the form of header .h, a .dll and .lib files. I added the library's directory to my project, I changed the "Configuration Properties -> C/C++ -> Additional Include Directories" to include the header file and I added the .lib file to the Additional Dependencies of the Linker.
If I try to include the header .h in my .cpp file using
#include "library.h"
everything works fine and the compiler it gives no error. But if I put this line in my header .h file and try to compile I get this error:
error C1083: Cannot open include file: 'library.h': No such file or directory
Any ideas? Thanks in advance.

C++ #include can't find file

I need to build this c++ project.
its failing on the line
#include <wkhtmltox/image.h>
#include <wkhtmltox/pdf.h>
fatal error C1083: Cannot open include file: 'wkhtmltox/image.h': No such file or directory
fatal error C1083: Cannot open include file: 'wkhtmltox/pdf.h': No such file or directory
clearly its not finding the file. i have the file on disk but just need to point the project at it some how.
how do i set the project up so it can see this file?
Also If its not already clear, i'm a complete novice at c++
edit:
i'm trying to build this: https://github.com/antialize/wkhtmltopdf-bindings/tree/master/wkhtmltoxcom/
Visual Studio 2008
Goto "Tools->Options->Projects and Solutions" then select "VC++ directories" and select "Include files" in the combo box at top right corner. Specify the directory where the file is present. That should solve the problem.
Or if you want to customize it per project, hit Alt F7 or go to Project -> Properties -> C++ -> General, and set the include directories.