Cannot Open Include File: 'Ctype.H': No Such File or Directory

Visual Studio 2022: Cannot open include file: 'ctype.h'

I found a bug report which is related: https://developercommunity.visualstudio.com/t/windows-81-sdk-1/151682

Although Microsoft staff declined to accept it as a bug, it is happening for me as well. When I install only Windows 8.1 SDK, no project can be compiled with it. I even tried to create a new Windows API project in VS2022, the project was created, but failed to compile with the same error.

So I tried to install Windows 10 SDK (from VS2022 installed, but that is probably not important) and this added some missing files which now help to compile Windows 8.1 SDK projects. Problem seems to be solved, my old C++ code can now be compiled with Windows 8.1 SDK and both C++ build tools 2015 and 2022.

fatal error C1083: Cannot open include file: 'excpt.h' and 'ctype.h'

I see the Header file here:

C:\Program Files (x86)\Windows Kits\8.1\Include\km\crt\excpt.h

So add the path C:\Program Files (x86)\Windows Kits\8.1\Include\km\crt\ to the search for includes files in the project properties.

If you use the Win10 SDK (for Version 1511), it it located here:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\km\crt\excpt.h


Related Topics



Leave a reply



Submit