VS2015 cl Can't find CRT libs (stdio.h, ctype.h etc.) when building on command line

前端 未结 3 2024
谎友^
谎友^ 2020-12-31 05:02
  • I have installed the latest VS2015 Professional version.
  • Opened the Visual Studio command prompt and ran vcvars32.bat
  • wrote a simple helloworld.cpp p
相关标签:
3条回答
  • 2020-12-31 05:09

    In my case, I added these paths to the additional include path:

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\winrt;$(IncludePath)

    and added these paths to the additional lib path:

    C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\um\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\ucrt\x86;$(LibraryPath)

    0 讨论(0)
  • 2020-12-31 05:25

    I ran into a similar problem on VS2017 (15.5.5) when building VC++ projects against Windows SDK 8.1:

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

    Checking Windows 8.1 SDK and UCRT SDK in the VS installer solved the problem. Windows 8.1 SDK and UCRT SDK

    0 讨论(0)
  • 2020-12-31 05:31

    If you have WDK (Windows Driver Kit - 10.0.26639) installed you will encounter this issue as the include paths are overwritten by the WDK. To get this to work, you must uninstall the WDK and it should work.

    Take a look at the Microsoft Connect issue - https://connect.microsoft.com/VisualStudio/feedback/details/1610302/universalcrt-detection-breaks-when-windows-driver-kit-is-installed

    0 讨论(0)
提交回复
热议问题