How to fix Cannot open source file: 'seal/util/config.h' - c++

I am currently using VS studio 2019 and cloned from GIT MicrosoftSEAL using Visual Studio i am having problems making it run.
I already downloaded C++ packages along with SDK 10.0.16299.0 then retargetted the whole projects but still getting the 34 errors (1 E196 and 33 C0183) from a file called mscv.h which has the include line underlined
// Read in config.h
#include "seal/util/config.h"
Errors:
Error (active) E1696 cannot open source file "seal/util/config.h"
Error C1083 Cannot open include file: 'seal/util/config.h': No such file or directory

Related

Can't use external C++ libraries in Visual Studio

I've been fighting with this for hours today - trying to run some simple code from a MatPlot++ library. The code is copied and pasted straight from their website. Every time I try to run the code (using VS community 2019) I get a series of errors:
Error (active) E1696 cannot open source file "matplot/matplot.h"
Error (active) E0725 name must be a namespace name
Error (active) E0020 identifier "pareto" is undefined
Error (active) E0020 identifier "title" is undefined
Error (active) E0020 identifier "show" is undefined
Error C1083 Cannot open include file: 'matplot/matplot.h': No such file or directory
Here's the code:
#include <cmath>
#include <matplot/matplot.h>
#include <random>
int main() {
using namespace matplot;
std::vector<double> codelines = { 200, 120, 555, 608, 1024, 101, 57, 687 };
std::vector<std::string> coders = { "Fred", "Ginger", "Norman", "Max",
"Julia", "Wally", "Heidi", "Pat" };
pareto(codelines, coders);
title("Lines of Code by Programmer");
show();
return 0;
}
I've installed the library using the exe installer, I've downloaded the source files and added their directory to the additional include directories. I've put the files inside the project directory, tried several variations of #include using different filepaths. Nothing is working.
The closest I've got is putting the library files into the project folder and changing it to use "" instead of <>. This got rid of the errors for the main matplot.h header file, but then it created errors saying that every single dependency was also missing, despite them all being within the same directory.
Please can someone help point out what I could be doing wrong here? I'm not used to using external libraries so its driving me crazy.

How to add Open eVision library to a project in Microsoft Visual Studio for a C++ project

I am trying to run a sample C++ project in Microsoft Visual Studio 2019. The sample file is generated using Open eVision Studio
// This cpp script file was created by Open eVision Studio.
// Open eVision Studio (c)Euresys s.a. Belgium 2006.
// Date : 9/3/2020 at 10:37.
// This section contains the variable declarations
#include "Open_eVision_2_10.h"
using namespace Euresys::Open_eVision_2_10;
using namespace std;
EImageBW8 EBW8Image1; // EImageBW8 instance
EImageBW8 EBW8Image2; // EImageBW8 instance
EImageBW8 EBW8Image3; // EImageBW8 instance
// This section contains the operations code
try {
EBW8Image1.Load("C:\\Users\\Public\\Documents\\Euresys\\Open eVision 2.10\\Sample Images\\EasyMatch\\Switch1.tif");
EBW8Image2.Load("C:\\Users\\Public\\Documents\\Euresys\\Open eVision 2.10\\Sample Images\\EasyMatch\\Switch1.tif");
EBW8Image3.SetSize(512, 512);
// Make image black
EasyImage::Oper(EArithmeticLogicOperation_Copy, EBW8(0), &EBW8Image3);
EasyImage::Threshold(&EBW8Image2, &EBW8Image3, 85);
EasyImage::Threshold(&EBW8Image2, &EBW8Image3, 126);
EasyImage::Threshold(&EBW8Image2, &EBW8Image3, 139);
}
catch(const EException&){
// Insert exception handling code here
}
What I am trying to do is to run this in Microsoft Visual Studio 2019. I have created a C++ Desktop application and copy pasted the above code. In the project properties C/C++ -> General -> Additional include directories as C:\Program Files %28x86%29\Euresys\Open eVision 2.10\Include;
But error during build. Some of the error displayed.
Error (active) E1696 cannot open source file "Open_eVision_2_10.h" euresys_1
Error (active) E0276 name followed by '::' must be a class or namespace name euresys_1
Error C1083 Cannot open include file: 'Open_eVision_2_10.h': No such file or directory euresys_1
Error (active) E0020 identifier "EImageBW8" is undefined euresys_1
The screen shot

Error: Cannot open include file: 'MQTTAsync.h': No such file or directory

OS -Windows 10 x64
Library mqtt
Microsoft Visual Studio Community 2017 Version 15.9.15
Programming Language - C++17
Installed paho-mqtt paho-mqttpp3 paho-mqttpp3[ssl] using vcpkg
I am creating a c++ program using mqtt.
But whenever I am using below given header
#include <mqtt/async_client.h>
It is giving following error
d:\vcpkg\installed\x64-windows\include\mqtt\async_client.h(27): fatal error C1083: Cannot open include file: 'MQTTAsync.h': No such file or directory
But MQTTAsync.h file is available on the given location
D:\vcpkg\installed\x64-windows\include\paho-mqtt
I had followed below link by creating new console project
https://github.com/Microsoft/vcpkg/issues/1848
Still issue is not getting resolved
Verify the correct name in your vcpkg-directory.
In my case that would be C:\Users\USERNAME\vcpkg\installed\x64-windows\include\paho-mqtt
Here you will see that the header file you are looking for is actually called MQTTAsync.h
To add it in your project you will have to change your inlcude to #include <paho-mqtt/MQTTAsync.h>

Visual Studio C++ cannot open some headers I didn't deliberately include

today I wanted to start learning C++.
However I keep getting these errors:
Cannot open source file "stdio.h"
Cannot open source file "tchar.h"
Cannot open source file "SDKDDKver.h"
However, I even get these in a default empty win32 console project.
Does anyone know how to fix this?
OS: windows 10
My default code looks like this:
// HelloWorld.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main()
{
return 0;
}
The errors are:
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "stdio.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\stdafx.h 10
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "tchar.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\stdafx.h 11
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "SDKDDKVer.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\targetver.h 8
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "stdio.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\stdafx.h 10
In the OUTPUT window:
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
EDIT:
I believe I have C++ installed, cause first when I went to
file > new > project > Visual C++
It would only show me "Install ... for C++", So I installed one of the first options (don't remember which one it was) and after installing it allowed me to create projects.
Check your stdafx.h contents. Headers can be included transitively. In particular, the three ehaders you quote are in the VC++ stdafx.h for new projects. You can simply remove them if you're programming C++.
(It says something about Microsoft's struggle to choose between C and C++ : They don't support C99, but they default to a C header instead of C++. Not even <cstdio>. )

having trouble compiling old VC++ 6 c++ code

I am trying to compile MSVC 6 C++ code using MSVC 2008 Express on 64 bit windows 7. When I tried to open the .sln file, I get the error "project file dpcwebcfx.vproj could not be loaded". I don't have the .vproj file, but I do have dpcwebcfx.dsw file. So in the .sln file I changed
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpcwebcfx", "dpcwebcfx.vcproj", "{355F3EB4-3B37-4272-B454-340E9B3BD9D3}"
to
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpcwebcfx", "dpcwebcfx.dsw", "{355F3EB4-3B37-4272-B454-340E9B3BD9D3}"
Now I get an error converting the dsw file: Cannot load the project due to a corrupt project file. What should I do? Am I missing a file so that I can't open this project?