moderncpp | Modern C++ : Snippets and Examples | Learning library
kandi X-RAY | moderncpp Summary
kandi X-RAY | moderncpp Summary
Modern C++: Snippets and Examples
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of moderncpp
moderncpp Key Features
moderncpp Examples and Code Snippets
Community Discussions
Trending Discussions on moderncpp
QUESTION
I have started experimenting with C++/WinRT using Visual Studio 2017 Community Edition. I now have an environment in which I can build a debug version of a sample application and run it. I had to:
- download and install latest Windows 10 SDK
- update Visual Studio 2017 with the C++/WinRT package and templates
- update Windows 10 OS to the latest build, build 1803
Documentation and web pages described the C++/WinRT package update to Visual Studio and trying a compile of the example gave me an error indicating to download and install the latest Windows 10 SDK.
It was when I tried to actually run the debug build of the sample application that I found out I also needed Windows 10 Build 1803.
Is Windows 10 Build 1803 a requirement for running an application using Stadard C++ and C++/WinRT or was my experience due to using a Debug build?
Does this mean that people who have not upgraded their Windows 10 installation to at least Windows 10 Build 1803 will be unable to run an application developed with C++/WinRT?
Is it possible that an Enterprise or business customer will elect to eliminate the necessary C++/WinRT components when they do an Enterprise specific upgrade from their own servers with their own specific set of updates so that a C++/WinRT application will fail to run in their environment?
Is there some kind of packaging so that the necessary C++/WinRT components can be included with the application?
Addendum: Two test applications
I have retried from scratch the two test applications that I have worked with. This retry effort is after making the modifications of installing the latest Windows 10 SDK, 10.0.17134, and installing the C++/WinRT Visual Studio extension and updating my PC to Windows 10 1803.
The first C++/WinRT application that I tried was a console application from an article by Kenny Kerr, C++ - Introducing C++/WinRT which had the following sample application:
...ANSWER
Answered 2018-May-08 at 17:01The C++/WinRT projections are just C++ headers. By themselves, they have no particular runtime requirements beyond the Windows Runtime APIs you are consuming.
The real question is what APIs are you using in your application (either via C++/WinRT or using the C++/CX language extensions (a.k.a. /ZW
)), and what value you have set as the WindowsTargetPlatformMinVersion
value when you build your UWP app.
With WindowsTargetPlatformVersion
set to the latest Windows 10 SDK (17134), you can set the minimum required OS version for your UWP app to 17134, 16299, 15063, 14393, 10586, or 10240. You'll need to test your application on that version and make sure you guard any use of newer APIs.
From a practical standpoint, you should not need to support 10240 which is why the default in Visual Studio for a new project is 10586. For consumer editions, 14393 is as old as you are ever likely to encounter in the real-world.
QUESTION
This C++/WinRT announcement states "What this also means is that you no longer need to wait for us to update GitHub following the release of a new Windows SDK. Indeed, we will no longer be publishing the updated headers on GitHub at all since you can get them directly from the Windows SDK."
However if one delves one click further one finds that the "Windows 10 Preview Build of the SDK [is] to be used in conjunction with Windows 10 Insider Preview (Build 17025 or greater)" and "Installation on an operating system that is not a Windows 10 Insider Preview build is not supported and may fail."
Right now must one install a Windows Insider Preview of Windows 10? This is either a scary and lengthy process or straight impossible depending on one's admin rights.
Or can one grab the SDK and use the C++/WinRT bits on a box with a standard Windows 10 build?
Is the easiest route for some aspects of the C++/WinRT toolchain still GitHub?
How about if one is developing on a non-Windows-10 box, e.g. Windows 7? Zillions of commercial developers are in this situation and aren't in control of that.
Will the situation change and if so when?
Going forward does one wait for periodic updates to SDK previews, and if so how does one consume them?
...ANSWER
Answered 2018-Feb-14 at 02:06Preview versions of the Windows SDK will not install on a non-Insider build of Windows. This is a restriction of the Windows SDK and not specific to C++/WinRT. In the long run (once RS4 ships) this won’t be a problem since you’ll be able to install the final Windows SDK for RS4 without this restriction.
In the short term, you need an Insider build of Windows to install the SDK, but you can then use that to target previous versions of Windows. I’m not sure whether it would work on Windows 7, but I don’t think that any developer using C++/WinRT would care to use Windows 7 when the Windows Runtime isn’t even available on that version of Windows at all.
The cppwinrt.exe compiler also relies on Windows 10 APIs to function. While this isn’t a dependency of code built with C++/WinRT, it is a requirement for building C++/WinRT components. Of course, the resulting binaries can then be executed on older versions of Windows, provided you handle light-up in the usual ways, such as with delay-loading.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install moderncpp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page