Select UCRT for legacy windows target

Reto Felix 41 Reputation points
2021-04-28T10:06:12.167+00:00

I create a C++ Project with Visual Studio 2019 for Windows 8.1.

The used UCRT is from Windows Kits\10\Source\10.0.10240.0\ucrt.
But in this Version are some bugs.

How can I used a newer UCRT (SDK) for Windows 8.1 projects?

RetoFelix

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,754 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jeanine Zhang-MSFT 9,766 Reputation points Microsoft Vendor
    2021-04-29T02:25:27.87+00:00

    Hi,

    I suggest you could install the winsows sdk you need in the visual studio installer.

    Visual Studio Installer -> modify -> Individual components -> SDKs,libraries and frameworks

    You could choose download and install the SDK which you want.

    92388-4291.png

    And then you could choose the ucrt you want to use for your project. Right click the project-> Properties -> General -> Windows SDK Version

    92389-4292.png

    Best Regards,

    Jeanine Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Jeanine Zhang-MSFT 9,766 Reputation points Microsoft Vendor
    2021-04-30T02:01:09.203+00:00

    Hi

    @Reto Felix

    If you want to configuring programs for Windows XP, you just use the Visual Studio 2017 v141_xp toolset.

    For more details I suggest you could refer to the Doc: Configuring Programs for Windows XP

    According to the Doc:

    The UCRT is now a Windows component, and ships as part of Windows 10. The static library, DLL import library, and header files for the UCRT are now found in the Windows 10 SDK. When you install Visual C++, Visual Studio setup installs the subset of the Windows 10 SDK required to use the UCRT. You can use the UCRT on any version of Windows supported by Visual Studio 2015 and later versions. You can redistribute it using vcredist for supported versions of Windows other than Windows 10.

    As I mentioned above, you could install the winsows sdk you need in the visual studio installer. Whether you have installed the winsows sdk you want in Individual components?

    92729-4301.png

    Best Regards,

    Jeanine Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Reto Felix 41 Reputation points
    2021-04-30T10:06:02.837+00:00

    HI
    I know to build for Windows XP.
    I have installed the following Toolset and the SDK 10.0.18362.0 for windows 10.
    92905-1.png

    92918-3.png
    As soon as I select v141_xp as toolset and select apply the options are changed and only SDK 7.0 is available.
    92877-2.png
    With SDK 7.0 the UCRT from Windows Kits\10\Source\10.0.10240.0\ucrt is used.
    Normaly I link staticly to the CRT so no deploy of CRT is required.
    But the static UCRT in 10.0.10240.0 has some bugs.
    When I use the toolset v142 with SDK 10.0.18362.0 the UCRT from Windows Kits\10\Source\10.0.18362.0\ucrt is staticly linked and the bug is gone.
    But then Windows XP is no longer supported.

    So my question who can I use v141_xp toolset with a newer UCRT then 10.0.10240.0?

    RetoFelix


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.