36
votes

I installed c++ package on VS 2015 , if I tried to build the project ,the following problem appears :

C1083 Cannot open include file: 'ctype.h': No such file or directory Win32Project5 c:\program files (x86)\windows kits\8.1\include\um\winnt.h 31

Any possible solution ....

4
What project are you trying to build? Post project properties and the include directories of your config... - Rama
I found the 'ctype.h' file and included the directory to the project , the problem has gone , but i'm getting another problem : cannot open file uctrd.lib - M.Hamza Al Omari
In my case this was because of WDK: stackoverflow.com/a/35927499/3092609 - Anton Kukoba

4 Answers

23
votes

Repair / Reinstall visual studio. Make sure that the Windows SDK option (Probably 8.1 in your case) is ticked, As you can see in this picture: enter image description here

6
votes

To add the missing component, go to Control Panel -> Uninstall a Program, and select to Change the installation of Visual Studio. Then, here is the option you need to check: enter image description here Then press "Modify".

Also don't forget to update the project's Properties to be using Windows SDK version 10.0.17134.0. enter image description here

6
votes

Right click on your solution or project in the solution explorer & Retarget your solution or project to the installed SDK version

1
votes

Here is mine VS 2017 build tools configuration to make Python 3.7 and up to compile on my local machine and fix. Please notice that MS changed VS Studio Build Tools interface

VS Build Tool 2017 configuration for pyodbc compilation

In order to make code to compile you also MUST to install ODBC driver

You can download VS 2017 Build tools from: https://visualstudio.microsoft.com/downloads/

VS Build Tool 2017 download