Can’t find .h files

%3CLINGO-SUB%20id%3D%22lingo-sub-3238428%22%20slang%3D%22en-US%22%3ECan%E2%80%99t%20find%20.h%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3238428%22%20slang%3D%22en-US%22%3E%3CP%3EI%20installed%20VS2022%20in%20order%20to%20create%20some%20windows%20C%2B%2B%20applications.%20I%20selected%20the%20workloads%20relating%20to%20C%2B%2B%20and%20desktop%20applications%20but%20when%20I%20try%20and%20create%20an%20application%20and%20compile%20it%20it%20comes%20up%20with%20lots%20of%20the%20standard%20C%2B%2B%20files%20missing%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26gt%3BIn%20guiddef.h%3A%26nbsp%3B%20%26nbsp%3Bstring.h%3C%2FP%3E%3CP%3E%26gt%3BIn%26nbsp%3B%26nbsp%3Bwinnt.h%3A%26nbsp%3B%20%26nbsp%3Bctype.h%2C%26nbsp%3Bstring.h%26nbsp%3B%3C%2FP%3E%3CP%3E%26gt%3BIn%20framework.h%3A%26nbsp%3B%20%26nbsp%3Bmalloc.h%2C%26nbsp%3Bmemory.h%2C%26nbsp%3Btchar.h%3C%2FP%3E%3CP%3ECannot%20open%20include%20file%3A%20'ctype.h'%3A%20No%20such%20file%20or%20directory%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20trying%20adding%20all%20manner%20of%20extras%20from%20the%20list%20but%20nothing%20I%20do%20works.%20I%20have%20even%20deleted%20the%20entire%20package%20and%20tried%20reinstalling%20it%20several%20times%20but%20with%20the%20same%20result.%20It%20tries%20to%20compile%20it%20but%20I%20get%20the%20same%208%20or%209%20missing%20files.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20error%20file%3A%3C%2FP%3E%3CP%3EBuild%20started...%3CBR%20%2F%3E------%20Build%20started%3A%20Project%3A%20WindowsProject1%2C%20Configuration%3A%20Debug%20Win32%20------%3CBR%20%2F%3EWindowsProject1.cpp%3CBR%20%2F%3EC%3A%5CProgram%20Files%20(x86)%5CWindows%20Kits%5C10%5CInclude%5C10.0.20348.0%5Cum%5Cwinnt.h(34%2C10)%3A%20fatal%20error%20C1083%3A%20Cannot%20open%20include%20file%3A%20'ctype.h'%3A%20No%20such%20file%20or%20directory%3CBR%20%2F%3EDone%20building%20project%20%22WindowsProject1.vcxproj%22%20--%20FAILED.%3CBR%20%2F%3E------%20Build%20started%3A%20Project%3A%20WindowsProject1%2C%20Configuration%3A%20Release%20Win32%20------%3CBR%20%2F%3EWindowsProject1.cpp%3CBR%20%2F%3EC%3A%5CProgram%20Files%20(x86)%5CWindows%20Kits%5C10%5CInclude%5C10.0.20348.0%5Cum%5Cwinnt.h(34%2C10)%3A%20fatal%20error%20C1083%3A%20Cannot%20open%20include%20file%3A%20'ctype.h'%3A%20No%20such%20file%20or%20directory%3CBR%20%2F%3EDone%20building%20project%20%22WindowsProject1.vcxproj%22%20--%20FAILED.%3CBR%20%2F%3E------%20Build%20started%3A%20Project%3A%20WindowsProject1%2C%20Configuration%3A%20Debug%20x64%20------%3CBR%20%2F%3EWindowsProject1.cpp%3CBR%20%2F%3EC%3A%5CProgram%20Files%20(x86)%5CWindows%20Kits%5C10%5CInclude%5C10.0.20348.0%5Cum%5Cwinnt.h(34%2C10)%3A%20fatal%20error%20C1083%3A%20Cannot%20open%20include%20file%3A%20'ctype.h'%3A%20No%20such%20file%20or%20directory%3CBR%20%2F%3EDone%20building%20project%20%22WindowsProject1.vcxproj%22%20--%20FAILED.%3CBR%20%2F%3E------%20Build%20started%3A%20Project%3A%20WindowsProject1%2C%20Configuration%3A%20Release%20x64%20------%3CBR%20%2F%3EWindowsProject1.cpp%3CBR%20%2F%3EC%3A%5CProgram%20Files%20(x86)%5CWindows%20Kits%5C10%5CInclude%5C10.0.20348.0%5Cum%5Cwinnt.h(34%2C10)%3A%20fatal%20error%20C1083%3A%20Cannot%20open%20include%20file%3A%20'ctype.h'%3A%20No%20such%20file%20or%20directory%3CBR%20%2F%3EDone%20building%20project%20%22WindowsProject1.vcxproj%22%20--%20FAILED.%3CBR%20%2F%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20Build%3A%200%20succeeded%2C%204%20failed%2C%200%20up-to-date%2C%200%20skipped%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20have%20also%20installed%20the%20VS2022%20package%20on%20an%20old%20laptop%20expecting%20the%20same%20result%20but%20it%20just%20worked%20first%20time!%26nbsp%3B%26nbsp%3BBoth%20machines%20are%20running%20W10%20with%20VS2022%20community%20version.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20ideas!%20I%E2%80%99ve%20wasted%20two%20days%20trying%20to%20get%20this%20to%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3238428%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ewindows%20forms%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Frequent Visitor

I installed VS2022 in order to create some windows C++ applications. I selected the workloads relating to C++ and desktop applications but when I try and create an application and compile it it comes up with lots of the standard C++ files missing:

 

>In guiddef.h:   string.h

>In  winnt.h:   ctype.h, string.h 

>In framework.h:   malloc.h, memory.h, tchar.h

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

 

I have been trying adding all manner of extras from the list but nothing I do works. I have even deleted the entire package and tried reinstalling it several times but with the same result. It tries to compile it but I get the same 8 or 9 missing files.

 

The error file:

Build started...
------ Build started: Project: WindowsProject1, Configuration: Debug Win32 ------
WindowsProject1.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Done building project "WindowsProject1.vcxproj" -- FAILED.
------ Build started: Project: WindowsProject1, Configuration: Release Win32 ------
WindowsProject1.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Done building project "WindowsProject1.vcxproj" -- FAILED.
------ Build started: Project: WindowsProject1, Configuration: Debug x64 ------
WindowsProject1.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Done building project "WindowsProject1.vcxproj" -- FAILED.
------ Build started: Project: WindowsProject1, Configuration: Release x64 ------
WindowsProject1.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Done building project "WindowsProject1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========


I have also installed the VS2022 package on an old laptop expecting the same result but it just worked first time!  Both machines are running W10 with VS2022 community version.

Any ideas! I’ve wasted two days trying to get this to work.

1 Reply

Hi @Cowasaki,

Thanks for posting your issue here.

However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.

Best Regards,
Lan Huang