[gdal-dev] RFC68: C++11 compilation mode - Call for vote on adoption

Mateusz Loskot mateusz at loskot.net
Wed Sep 6 22:47:40 PDT 2017


On 7 September 2017 at 01:01, Joaquim Luis <jluis at ualg.pt> wrote:
> On Wed, 06 Sep 2017 21:22:18 +0100, Mateusz Loskot <mateusz at loskot.net> wrote:
>> On 6 September 2017 at 21:53, Kurt Schwehr <schwehr at gmail.com> wrote:
>>>
>>> I was just about to write something along the lines that follow, but
>>> Mateusz
>>> looks to have more of an understanding.
>>>
>>> My best guess was that it is an incomplete install of Windows?  e.g.
>>>
>>>
>>> https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
>>
>>
>> Universal C Runtime and Universal Windows Platform are two different
>> beasts.
>> Universal C Runtime is part of Windows 10+ system
>> Kurt's link above leads to installer of Universal CRT for older
>> Windows versions.
>>
>> Here is into to Universal CRT
>>
>> https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/
>>
>> It is all related to the fact that VS2015 and VS2017 are binary
>> compatible.
>
>
>
> Well, this is in the minimum confusing and I may have been mislead by my
> TortoiseSVN installation that ships those dlls. The link says:
>
> "If you build software designed for use on Windows operating systems where
> the Universal CRT is not guaranteed to be installed (i.e., Windows 8.1 and
> below), your software will need to depend on the above mentioned Windows
> Update packages to install the Universal CRT."

Yes, it is confusing. I also completely ignored the fact that I'm on Windows 10.
where the Universal CRT is a system component, and since for others there is
system update, I assumed everyone with up-to-date older Windows system
has got that too.

The [1] says
"Microsoft Visual Studio 2015 creates a dependency on the Universal CRT when
applications are built by using the Windows 10 Software Development Kit (SDK). "

I'm not sure what if software is built w/ VS2015 using Windows SDK 8,
for example.

The [2] says more on upgrading to the Universal CRT.

James McNellis (Microsoft) explains in comments to [3]:

"One of the design goals for the Universal CRT was to produce a single
CRT that could run on all Windows platforms.
This includes ancient Windows platforms like Windows XP and recent
Windows platforms like Windows Phone or the Windows for IoT.
This is the reason that the numerous APISet forwarders (the
api-ms-win-*.dll DLLs) are required:
On legacy platforms like Windows XP, we need to depend on
kernel32.dll, whereas on “modern” platforms like Windows 10 we need to
depend on APISets"

I'd dare a suspicion that targetting Windows 8 SDK with VS2015 may not
require (some) those forwarders.


Finally, James McNellis explains in [3]:

"Updated September 11, 2015:
App-local deployment of the Universal CRT issupported.
To obtain the binaries for app-local deployment, install the Windows
Software Development Kit (SDK) for Windows 10.
The binaries will be installed to C:\Program Files (x86)\Windows
Kits\10\Redist\ucrt.
You will need to copy all of the DLLs with your app (note that the set
of DLLs are necessary is different on different versions of Windows,
so you must include all of the DLLs in order for your program to run
on all supported versions of Windows)."


AFAIU, Universal CRT must be installed as Windows Update.
Then, VCRedist package can be included in your installer from merge
modules (.msm).


My sincere apologies for confusion.

I always upgrade to latest Visual Studio + Windows as soon as they are
out, so I've been a bit of an ignorant.


[1] https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
[2] https://docs.microsoft.com/en-us/cpp/porting/upgrade-your-code-to-the-universal-crt
[3] https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list