glfw/glfw3.h': No such file or directory - glfw

When trying to run a Vulkan project in VS 2022 on Windows 11, it just throws this error:
fatal error C1083: Cannot open include file: 'glfw/glfw3.h': No such file or directory
In the main .hpp file, I use:
#include <glfw/glfw3.h>
The Configuration Properties->C/C++ Additional Include Directories has this line:
C:\Users\Me\OneDrive\Documents\Coding\Libraries\glfw-3.3.5.bin.WIN64\include
The glfw3.h is located at:
"C:\Users\Me\OneDrive\Documents\Coding\Libraries\glfw-3.3.5.bin.WIN64\include\glfw\glfw3.h"
Any idea on how to solve this issue?

Related

Can't Include Qt's Include Files

I want to learn Qt in C++ (using VSCode), but I can't because of this single problem.
I have tried:
Putting the include folder in c_cpp_properties (C:/Qt/6.3.1/mingw_64/include)
Putting INCLUDEPATH += C:/Qt/6.3.1/mingw_64/include in the project file (.pro)
Using /i compiler flag
If I run the file in VSCode (through code . from the developer command prompt for VS 2022), the error is:
C:\Users\<Name>\Pins\Codes\C++\testing.cpp(1): fatal error C1034: QtWidgets: no include path set
But if I run the file in the developer command prompt for VS 2022 (the compiler is in there), the error is:
testing.cpp(1): fatal error C1083: Cannot open include file: 'QtWidgets': No such file or directory
Code:
#include <QtWidgets>
int main() {
QWidget window;
window.resize(640, 480);
window.show();
}
Check include folder. I guess "QTWidgets" library can be found in its own folder or "Lib" folder, not in "include" folder.

Cannot open source file "glew.h" and "freeglut.h"

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!

Boost Libraries and Visual Studio 2013

I have installed boost using MSVC toolset through command-line(command prompt).
Now, I want to know which directories should I include in my project properties.
Since when I add the following line to my project:
#include <filesystem\fstream.hpp>
It throws the following error:
1>c:\boost\boost_1_56_0\boost\filesystem\fstream.hpp(15): fatal error C1083:
Cannot open include file: 'boost/config.hpp': No such file or directory
I have added the followings to my project properties directories for libraries:
C:\boost\boost_1_56_0\boost
C:\boost\boost_1_56_0\stage\lib
This is where I have added the above paths:
(Project->Properties->VC++ Directories->Library Directories
Don't add the boost subdirectory to the search path; add the parent
C:\boost\boost_1_56_0
and specify the boost directory when you include the headers
#include <boost/filesystem/fstream.hpp> // Better to use / not \ for portability
The Boost headers include each other like that (with boost/ in the path), so now they can also be found.

Linking tesseract libs

I'm having trouble using tesseract.
I've downloaded the source code and compiled successfully.
Then I created a project in VC++ and I'm trying to do the first steps.
I created a simple program and included
#include <baseapi.h>
On project properties -> Linker -> Additional Dependencies i`ve put all the libs that tesseract generated
ccmain.lib ccstruct.lib ccutil.lib classify.lib cube.lib cutil.lib dict.lib image.lib libtesseract_tessopt.lib libtesseract_training.lib neural_networks.lib textord.lib viewer.lib wordrec.lib
I also set the path of libs on Additional Libraries Directories. It seems to recognize the libs. But the problem is that i`m getting the following error:
fatal error C1083: Cannot open include file: 'baseapi.h': No such file or directory
Can anyone help me? I`m just starting and it is difficult.
As an update, I've set the paths and included the files on my solution. But I'm getting different errors on ccutil.h.
*fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory *
Due to this code
#ifdef WIN32
#include <windows.h>
#else
#include <pthread.h>
#include <semaphore.h>
#endif
On your project you need to add the path to the tesseract headers in "Additional Include Directories".

c++" fatal error C1083: Cannot open include file: 'blabla': No such file or directory" only in Release Build

whenever I compile my project in the Release build I get this error:
Error 29 fatal error C1083: Cannot open include file: 'NX_Win32Wrapper.h': No such file or directory
I get another one just like this, just in a different file (the error complains about a different file). The file in the second error is whichever I included first (is on top of the include list), the same goes for the first error, but its right after:
(this is the "main".cpp file,where main() is and GameV2 is my project name
#include "stdafx.h"
#include "GameV2.h"
I know there is now code, but I think I'd have to post everything :P Do you have any suggestion what should I check?
It seems that you're using Visual Studio.
Check the include directories in project properties, for Release target. You set the proper include directories only for Debug target.
You should check the "Additional include directories" - the list should usually be the same for "Debug" and "Release".