是否可以使用 C++/WinRT 定位 Windows 10.0.14393? [英] Is it possible to target windows 10.0.14393 with C++/WinRT?

查看:29
本文介绍了是否可以使用 C++/WinRT 定位 Windows 10.0.14393?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 C++/WinRT 为我在 Win 10.0.14393(或 1609)上卡住的 Lumia 制作一个应用程序.我用

I would like to make an app for my Lumia stuck on Win 10.0.14393 (or 1609) using C++/WinRT. I've created a Blank app project with

  • 目标平台版本:10.0.17134.0 和
  • 目标平台最小.版本:10.0.14393.
  • Target platform version: 10.0.17134.0 and
  • Target platform min. version: 10.0.14393.

项目编译失败,错误如下:

The project fails to compile with the following errors:

错误 C2039:DisconnectUnloadedObject":不是winrt::BlankApp2::implementation::MainPageT"的成员

error C2039: 'DisconnectUnloadedObject': is not a member of 'winrt::BlankApp2::implementation::MainPageT'

错误 C2039:UnloadObject":不是winrt::BlankApp2::implementation::MainPageT"的成员

error C2039: 'UnloadObject': is not a member of 'winrt::BlankApp2::implementation::MainPageT'

这是错误还是故意行为?请注意,设置任何较新的 min.version 导致构建成功.

Is this a bug or intentional behavior? Please note, that setting any newer min. version results in successful build.

推荐答案

最新版本的 C++/WinRT 可以支持所有版本的 Windows 10,包括 14393 及更早版本.

The latest version of C++/WinRT can support all versions of Windows 10, including 14393 and older versions as well.

请记住,C++/WinRT 既是库又是语言投影.语言投影提供对面向给定 Windows 版本的 Windows API 的访问.每个版本都引入了新的 API.因此,如果您希望以最低版本的 Windows 为目标,则需要确保将自己限制在该版本的 Windows 上可用的 API.但是,我建议使用最新的编译器和最新的 Windows SDK,因为它们包含许多错误修复.

Keep in mind that C++/WinRT is both a library and a language projection. The language projection provides access to Windows APIs targeting a given version of Windows. Each version introduces new APIs. So if you want to target a minimum version of Windows, you need to ensure that you limit yourself to the APIs available on that version of Windows. I would however recommend using the latest compiler and the latest Windows SDK as they include many bug fixes.

这篇关于是否可以使用 C++/WinRT 定位 Windows 10.0.14393?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆