I have been trying to correct all compilation errors in my codes. After I got and impemente the very good counsels I got here
[
^] where I had pste the last cmpilati errrs.
The new errr is this:
1>shell.c
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals_core.h(28): STL1003: Unexpected compiler, expected C++ compiler.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals_core.h(29,1): fatal error C1189: #error: Error in C++ Standard Library usage
1>sqlite3.c
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals_core.h(28): STL1003: Unexpected compiler, expected C++ compiler.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals_core.h(29,1): fatal error C1189: #error: Error in C++ Standard Library usage
Checks n the intenet shows that it may be related to an improper use of a macro. What cuold be the solutin?
By the way, I am using visual studio 2022.
The following informationn could be relevant: it appears from the error message that the error may be conected to my inclusion of an #include "stdAfx.h" to shell.c and sqlite3.c which are c files for sqlite3 embedded database. Is it wrong to #include "stdAfx.h" to C files. My experience in the past has been that visual compels one to add stdafx.h to to every non-heaer files. Are c fies excluded?
I removed the stdafx.h header file and ended up with the following errors:
1>shell.c
1>C:\Users\HP\source\repos\ResultSheets\shell.c(28617,1): error C2857: '#include' statement specified with the /Ycstdafx.h command-line option was not found in the source file
1>sqlite3.c
1>C:\Users\HP\source\repos\ResultSheets\sqlite3.c(250817,1): error C2857: '#include' statement specified with the /Ycstdafx.h command-line option was not found in the source file
Th content of my heder file is s show below.
#pragma once
#define _X86_
#define NOMINMAX // this removes the min and max definitions
#include <SDKDDKVer.h>
#include <Windows.h>
#include <Commctrl.h>
#include <tchar.h>
#include <stringapiset.h>
#include <string.h>
#include <cstdio>
#include <stdarg.h>
#include <cstdlib>
#define _USE_MATH_DEFINES // get PI, e, etc. definitions
#include <math.h>
#pragma warning( push )
#pragma warning( disable : 4458 )
#include <gdiplus.h>
#include <gdiplusheaders.h>
#pragma warning( pop )
#include <memory>
#include <exception>
#include <stdexcept>
#include <fstream>
#include <filesystem>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include "resource.h"
What I have tried:
I have spent time reaing up the errr code after google searches.