Getting " Cannot open source file "pugixml.hpp" " error - c++

When I try to build solution in visual studio I get an error saying :
Cannot open source file "pugixml.hpp" along with some other errors , such as :
Cannot open include file: 'cereal/types/list.hpp': No such file or directory.
I downloaded the code onto my local machine from a SVN repository and the solution is an integration of C++ and C#. Could it be due to my limited access to the repo or not.
Thanks
I looked it up on the internet and I tried going to the project properties and adding the directory manually but I didn't work. I am not professional , so maybe I haven't done this properly.

Generally speaking, downloading an external library needs to include its library directory and various header file directories.
If a dll is used, this document explains how to use the dll.
Regarding Cannot open source file "...hpp", you could refer to the method in this issue.

Related

VSCode Intellisense "cannot open source file ...... " error C++

I am a new to programming in C++, it has been 1 month since I started. I use VSCode has my main IDE and made many projects with it. But each time I move a project in a different folder or pull one from a Github repository, the intellisense tells me that it cannot open source files in every header file or source file.
example of highlighting issue
Compiling is fine, the issue is I cannot see any basic writing mistakes and correct them directly.
(Using Windows 10, Mingw32, Makefile or CMake to compile)
I tried to add the path of library include folders in the c_cpp_properties.json (as seen in many tutorials) but it doesn't work. I also tried to change the intellisense mode in the settings but with no results.
Include path example
Several solutions from other forums have been tried but nothing works.
Do you have any idea how I can solve this ?

IntelliSense: Cannot open source file in include path

I am authoring a C++ project with Visual Studio 2013 Professional and I encountered a problem I have never encountered before.
In one of my source files I am including a third-party header file like this:
#include 'sqlcli1.h'
This file (and other files of the same set) are located in a an external directory (not in the VS solution), so I have added it to the search path using Additional include paths under project's Properties.
The solution does build succesfuuly, so I am sure my external header file is referenced correctly. IntelliSense, however, still doesn't see it and complains about not being able to open source file 'sqlcli1.h'. It does not prevent me from building the project, but it makes editing it much harder.
Why does this happen and what should I do?
Have you tried to delete files related to Intellisense in your solution directory? Go to .vs\(your solution name)\v(VS version)\, delete Browse.VC.db and ipch directory. VS will rebuild the IntelliSense database and it may help solve your problem.
Alas, I did everything above but, to no avail. For me the problem is the *.vcxproj file. I took the contents of a working *.vcxproj file and replaced it with the one that didn't work (changing the project name in the *.vcxproj file, of course!!) And, Wowie Zowie!! It works! There is probably a much more elegant solution, but this worked for me. Also, my problem was related to a C1083 error, too.

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.

cannot locate the .lib file VS12 is trying to open

So I am creating an app in VS2012 in MFC using an old Microsoft SDK (called VisSDK for machine vision) which worked fine with VS6. The problem is, I get this LNK1104 error, Cannot open file VisImSrcLibDB.lib.
I have done a search through the project for VisImSrcLibDB...but nothing came up. I have checked all the header files (external) and tried to see where is this being called.
I can presume (based on the name) that it seems to be part of the SDK, but cannot for the love of god figure out where is this being called from.
Any Help would be appreciated in this. Here is a screenshot:
PS: yes I have mapped the lib folder of the SDK under LINKER properties. and the corresponding include folder in the Additional Include directory.
If you haven't already, you should turn on the VS flags for verbose output. That should give some indication as to why things are being pulled into the build.
The VisImSrcLibDB.lib must exist some where in your VisSDK directory.
Use the PROJECT-Properties command, All configurations from the Configuration drop down list and add the directory containing the VisImSrcLibDB.lib file to the Library Directories in the VC++ Directories section.

When trying to reference a DLL project in the same solution as my EXE project, I get an error "Cannot open include file: 'iostream'

I'm trying to create a game and then link to my engine DLL library which references static libraries such as Math, Utils, Entities, Physics, etc. I'm new to DLLs and I've only ever linked to them, and never actually built them (same with static libs). I'm trying to link my console app to my engine DLL, but when I include a header file in my console app from my engine I get an error:
fatal error C1083: Cannot open include file: 'iostream': No such file or directory
Does anyone know how I could solve this?
Also, is this a good use of DLL files and static libraries? I'm trying to organize my code more professionally, even in a small project like this.
Edit: I forgot to mention the header file I'm including from engine into console app includes the iostream file, if that wasn't obvious before to you.
Thanks!
Please verify if you have included the required header files in your project.
#include<iostream>