fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory - c++

I think I did all the necessary configuration but I am still getting this:
Error 1 fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory File:c:\documents and settings\administrator\my documents\visual studio 2008\libs\boost_1_43_0\boost\smart_ptr\shared_ptr.hpp Line:17
Here are screenshots of setting I have done to add directories for include and lib files :
Am I missing something ?

I finally found the answer :) and I will write it here to help.
Project>"YOURPROJECT" Properties>C/C++>General>Additional Include Directories then select where you downloaded your library . This worked and all the above didn't, so make sure not to forget it .

I installed boost from the installer. It installs the library in c:\program files\boost.
Add the directory to your project's properties like the below

Please note that you need to add the path of "boost" directory in both 64bit and 32bit configurations. While adding the path, make sure to select appropriate platform (64bit or 32bit) depending upon your need. If you compile in both versions, you need add both.
Boost library directory is valid for both the above configurations.

For me, I was building targeting the win32 platform. Changing to x64 worked.

I had a similar problem... I'm using Visual Studio 2019 16.6.3. I think it got stuck somehow. I had upgraded a solution with multiple projects from 2015 to 2019. Most of the projects were building but for some reason one static library (outputting a .lib) kept complaining about some header files.
After several hours, I finally got Visual Studio C++ "unstuck" by disabling:
"Project Properties->C/C++->Additional Include Directories->dropdown->Edit ...->Checkbox Inherit from parent or project defaults"
This seems to have triggered some kind of rebuild of a cache of valid header files or something. Now the compiler error has disappeared. I went back into the same dialog and re-enabled "Inherit from parent or project defaults" and things are fine.

mmake sure you are not looking at boost-system instead of boost-filesystem

If you're trying to install Turbodbc in a python environment and seeing errors similar to the one mentioned in this question, I have written a detailed answer for this in a different thread - https://stackoverflow.com/a/65850615/5333178

Add the namespace after all headers:
using namespace std;
removing from the header (.h) did the trick.
remove all the ".h" from all headers. Should work.

Related

d3dx9.h: no such file or directories [duplicate]

Edit: Of course, immediately after working on it for an hour then posting here, I found the stupid mistake...
I'm getting compiler errors when trying to #include <d3dx9.h> in a project. I'm receiving "fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory".
I do have the DirectX SDK installed (I also just tried reinstalling it to no avail).
In the Project Properties:
VC++ Directories are set to "$(DXSDK_DIR)Include;$(IncludePath)" and "$(DXSDK_DIR)Lib\x86;$(LibraryPath)" for Include and Library directories respectively for all configurations—and the environment variable %DXSDK_DIR% points to C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\ as expected.
C/C++ > General settings has $(DXSDK_DIR)include listed in the Additional Include Directories
Linker > Input > Additional Dependencies has d3dx9d.lib included for Debug and d3dx9.lib included for Release configuration.
I am able to successfully compile and run tutorial projects from the DirectX Sample Browser.
Visual Studio's Intellisense/autocomplete will find d3dx9.h and suggest type and function names that are within the file (and not included through anything else I'm #includeing) so it seems that Intellisense can find it.
Any suggestions on what I'm forgetting or what else to try?
Thanks
you forgot one thing:
Go to VC++ Directories -> Library Directories
add $(DXSDK_DIR)LIB\x86
apply.
Done. Hope this helps
You should make sure you have ALL paths sorounded by quotes (").
Instead of $(DXSDK_DIR)include you should have "$(DXSDK_DIR)include"
I didn't realize that one of the other projects in the solution was #includeing a file that was #includeing a file that was #includeing d3dx9.h and I hadn't added those paths to that project.
/facepalm
Find the file on your computer, and add it's folder to the properties of your project.
Assuming you have visual studio: Properties/C/C++/General/Additional Include Libraries.
I tried all of these suggestions and none worked.
Turns out the $(DXSDK_DIR) variable doesn't work if you install DirectX while Visual Studio is still running. The solution for me was to restart Visual Studio (+ adding the paths in the solutions listed above, of course).

Cannot open include file: 'd3dx9.h': No such file or directory [duplicate]

Edit: Of course, immediately after working on it for an hour then posting here, I found the stupid mistake...
I'm getting compiler errors when trying to #include <d3dx9.h> in a project. I'm receiving "fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory".
I do have the DirectX SDK installed (I also just tried reinstalling it to no avail).
In the Project Properties:
VC++ Directories are set to "$(DXSDK_DIR)Include;$(IncludePath)" and "$(DXSDK_DIR)Lib\x86;$(LibraryPath)" for Include and Library directories respectively for all configurations—and the environment variable %DXSDK_DIR% points to C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\ as expected.
C/C++ > General settings has $(DXSDK_DIR)include listed in the Additional Include Directories
Linker > Input > Additional Dependencies has d3dx9d.lib included for Debug and d3dx9.lib included for Release configuration.
I am able to successfully compile and run tutorial projects from the DirectX Sample Browser.
Visual Studio's Intellisense/autocomplete will find d3dx9.h and suggest type and function names that are within the file (and not included through anything else I'm #includeing) so it seems that Intellisense can find it.
Any suggestions on what I'm forgetting or what else to try?
Thanks
you forgot one thing:
Go to VC++ Directories -> Library Directories
add $(DXSDK_DIR)LIB\x86
apply.
Done. Hope this helps
You should make sure you have ALL paths sorounded by quotes (").
Instead of $(DXSDK_DIR)include you should have "$(DXSDK_DIR)include"
I didn't realize that one of the other projects in the solution was #includeing a file that was #includeing a file that was #includeing d3dx9.h and I hadn't added those paths to that project.
/facepalm
Find the file on your computer, and add it's folder to the properties of your project.
Assuming you have visual studio: Properties/C/C++/General/Additional Include Libraries.
I tried all of these suggestions and none worked.
Turns out the $(DXSDK_DIR) variable doesn't work if you install DirectX while Visual Studio is still running. The solution for me was to restart Visual Studio (+ adding the paths in the solutions listed above, of course).

Visual Studio not using additional include directories for KinectBridgeWithOpenCVBasics D2D C++ Sample, but does for other solutions.

I'm working on adding some openCV features to a couple projects that use the Kinect and openGL/freeGLUT. I have downloaded and installed OpenCV using the pre-built libraries and successfully run a simple sample. Now I want to work with the Kinect Bridge with OpenCV Basics sample from the Kinect for Windows Developer Toolkit to get a better idea of how to use OpenCV with the Kinect. I downloaded the sample into my projects folder, opened the solution in visual studio and built it. I got the following errors:
Error 1 error C1083: Cannot open include file:
'opencv2/core/core.hpp': No such file or
directory c:\users\justin\documents\visual studio
2010\projects\kinectbridgewithopencvbasics-d2d\OpenCVHelper.h 17
and
Error 2 error C1083: Cannot open include file:
'opencv2/core/core.hpp': No such file or
directory c:\users\justin\documents\visual studio
2010\projects\kinectbridgewithopencvbasics-d2d\OpenCVFrameHelper.h 13
Initially I thought these errors were due to forgetting to specify the additional include directories. I added the same property sheet that my other OpenCV projects use to this one, but the errors remained. I tired copying the header files into the project folder: same thing. It seems like the only thing that works is specifying the full absolute file paths in the #include statements. I want to avoid doing this because visual studio wants me to change every #include in every file used in the project, including the openCV header files. I also tried shortening the name of my project folder in case the file path was too long (though I'm pretty sure that's more of an issue for the header file paths), but again no change.
The include directories and #includes that I'm trying to use are the same as in my other projects. I'm using Visual Studio 2010 on Windows 7 x64 based system.
Why would the additional include directory work for other projects, but not this one?
Usually when I see something like this it turns out to be a bad character in one of the prior include paths or other options that's messing everything up after it. I would take a look at your the command line page in the project configuration and see if you can spot anything amiss.

use of Log4cxx in visual studio 2012

I tried to build log4cxx for visual 2012 and, after 4 hours of resolving errors, the build was succesful (i'm not sure :)).
As a second step I tried to create a vs project to test logging.
I used this example but it keep tell me that
mainapp.cpp(2): fatal error C1083: Cannot open include file:
'log4cxx\logger.h': No such file or directory
I already specified in the linker the path of directory debug in additional library directories and I added "log4cxx.lib" additional dependencies .
I'm confused and I don't know how to make it work
thanks in advance for your help
You also need to add the directory, where headers for log4cxx are. This is not for linking phase, but for compiler phase.
This can be done with Project Properties -> Compiler -> Preprocessor (I think, I don't have VS opened now)
You don't include .lib. This file is for linking.
You need to add to includes the directory, which contains directory log4cxx, and that (log4cxx) directory must contain logger.h!

LINK : fatal error LNK1104: cannot open file "Iphlpapi.lib"

So I'm using Visual C++ 6.0, and trying to compile some source code, but upon compilation I get this:
Linking...
LINK : fatal error LNK1104: cannot open file "Iphlpapi.lib"
Error executing link.exe.
I'm using the correct SDK, and the directories are correct. I've checked, double checked, and triple checked. The file is the specified directory. I can't figure out what the problem is. Any ideas?
Service Pack 6
SDK for Windows Server 2003 SP1 //Sounds odd, since I'm running XP SP3, but this has worked for me in the past.
Like I've said, it worked in the past for me, flawlessly. I don't understand why it won't work now.
I'm sure that you have some problems with your project configuration. Try moving that file to the folder with your source code. Check the way you add it (via input libraries) to your project. Try creating a new project and moving that .lib into your code folder (after adding it to used libraries).
sysinternals procmon will show you where the build is looking. wont fix it but will give you a clue
(tools)
(options)
(directories) tab
(show directories for ) library files
In general, you want the path that includes the missing library to be included there.
so that all projects can find it.
The other option would be to add the library to your project using
(right click on the project)
(add files to project)
browse to, and add the library
One of those two methods should do the job for you
Maybe am very late to this discussion, the following solution worked for me.
The only setting required was to include the path to the library.
In VC++ 6.0, go to Tools -> Options -> Directories tab -> Select "LibraryFiles option" under "ShowDirectories" dropdown.
Add the path to the library, in my case the path is "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib"
compile using command prompt, Check the syntax, are the white spaces correctly placed e.g "cl practice.cpp /clr:safe /doc" is executed properly but "cl practice.cpp/clr:safe/doc" produces the error u mentioned