I have been working with project ThisIsMostCertainlyTrue.sln for several days now w/o any problems.
The subject issue has only manifested recently, which is:
Any attempt to Win32 compile a source file in vs2019 IDE throws the following error:
Build started...
1>------ Build started: Project: ThisIsMostCertainlyTrue, Configuration: Debug Win32 ------
1>ThisIsMostCertainlyTrue.cpp
1>C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133includesal.h(2361,1): error C2144: syntax error: 'int' should be preceded by ';'
1>C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133includesal.h(2361,8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>Done building project "ThisIsMostCertainlyTrue.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The problem is strictly repeatable for ThisIsMostCertainlyTrue.cpp and for any other source file in the same directory as ThisIsMostCertainlyTrue.cpp.
The problem DOES NOT manifest for other source files referenced by ThisIsMostCertainlyTrue.sln but not in the same directory as ThisIsMostCertainlyTrue.cpp.
The problem DOES NOT manifest for any other project in my collection of Win32 apps I have developed.
I am running C:Program Files (x86)Microsoft Visual Studio2019CommunityCommon7IDE on a 64-bit HP laptop running 64-bit Windows 11.
I had expected the compile attempt to complete w/o this anomaly, just as it had prior to 2 days ago.
I “repaired” vs2019 using ->Settings->Apps->InstalledApps, but doing so did not eliminate the anomaly.
Next, I examined C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133includesal.h in Ultraedit but could not identify the alleged problem.
One is permitted to edit sal.h, but write access is not permitted.
Placing an editable copy of sal.h in a directory ahead of >C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133include was not successful.
Among other questions already asked on StackOverflow, “C++ SAL.h errors in MSVC standard library”
had seemed promising but did not provide me any insight.