Re: Compile from source using latest Microsoft Windows SDK - Mailing list pgsql-hackers

From Peifeng Qiu
Subject Re: Compile from source using latest Microsoft Windows SDK
Date
Msg-id CABmtVJg0sirWW5pKZmasO3NndD0n3QefBeiasSzObJcSzVhKhw@mail.gmail.com
Whole thread Raw
In response to Re: Compile from source using latest Microsoft Windows SDK  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Responses Re: Compile from source using latest Microsoft Windows SDK  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
> For VS2017, the 8.1 SDK is part of the optional package set
Yeah, if you install 8.1 SDK VS2017 can compile. I install VS2017 using the GUI installer.
The main page are big checkboxs for packages sets like C++, .NET, Azure etc.
Checking C++ will only install the IDE and 10 SDK. 8.1 SDK is on the side panel detailed list.

>but it's really only a major issue for VS2019
VS2019 will use the latest v10 SDK by default. So no need to install 8.1 for VS2019.

> I guess we might need a test for what SDK is available?
We can just use the WindowsSDKVersion environment variable to determine the SDK for
current cmd session. It's set when you start the Visual Studio Prompt or call one bat script.
Developers can choose the right version best suit their need. Detecting all installed SDK
version can be done with some registry magic but I think that's not necessary in this case.

We should change the title of the patch to "compile from source with VS2017 and SDK v10",
since that's the only problematic combination. Our need is compile our own tools that link to
libpq and latest VC runtime. So libpq must also be linked with the same VC runtime, and
thus use the same SDK version.

Best regards,
Peifeng Qiu

pgsql-hackers by date:

Previous
From: Edmund Horner
Date:
Subject: Re: Tid scan improvements
Next
From: Michael Paquier
Date:
Subject: Re: Compile from source using latest Microsoft Windows SDK