引入winrt头文件时提示there are too many errors for the intellisense engine to function properly

	项目需要用到UWP的api,windows下c++使用windows runtime api 是微软的一
个愿景,做了许多工作,包括c++/CX等,最近又发布了c++/winrt,winrt问题目前
还是比较多。

	winrt编程很简单只需要引入(VC_IncludePath);$(WindowsSDK_IncludePath);
下的winrt头文件,里面提供了uwp的api到c++桌面程序的映射。一般这个include
路径是不用改变的,如果第一次include winrt 头文件提示can not open source file 
"winrt",需要手动设置一下include路径。这时候需要找到电脑上winrt这个文件
夹,winrt有多个,每个windows sdk文件夹下都有。就拿我用的10.0.19041.0来举
例,我的winrt文件夹在C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.19041.0\winrt。

	把winrt文件引入进来后,编译器会报错there are too many errors for the 
intellisense engine to function properly。这是因为winrt是用c++17编写的,这些
错误实际上都是文件里面的语法错误。解决方法是设置项目的
Configuration Properties/C/C++/Languge->C++ Languge Standard 为ISO C++17 Standard (/std:c++17)


至此可以在c++ console程序使用UWP的api
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
ComponentOne Studio for WinRT XAML 2013 v1 Part of: Ultimate | Enterprise Powerful WinRT XAML controls for building better Windows Store apps. Reduce Development Time Studio for WinRT XAML controls come packed with an array of built-in features attainable by writing very little code. Without these controls you would spend days, weeks, and even months writing them yourself. Your return on investment is huge – development teams who use 3rd party controls have seen weeks and even months shaved from their development cycle. Let your team focus on the business logic rather than reinventing the wheel. Fills the WinRT Gaps Fills the WinRT Gaps Studio for WinRT XAML provides many controls and features missing from WinRT, such as date/time pickers, calendars, data visualization, layout panels, masked text, and numeric input. Stunning and Powerful Data Visualization Stunning and Powerful Data Visualization With 30+ chart types, flexible data binding, run-time interaction, rich styling capabilities, and so much more, C1Chart is the most advanced charting control on the market. Apply styles, animations, markers, and live updates to bring your dashboards to life! Edit, Sort, and Filter Your Data Edit, Sort, and Filter Your Data Only with the legendary C1FlexGrid control can you get tabular data editing for the Windows Store. Display data records across columns and down rows with this simple, yet powerful grid control. Plus, get live sorting, filtering, and grouping for any list control with C1CollectionView. View Documents and Reports View Documents and Reports Add document viewing capabilities to your Windows Store apps. The C1PdfViewer control can display PDF documents within your applications without requiring any external application. Load arbitrary PDF documents with support for smooth page navigation and zooming. Reuse Your Code Reuse Your Code Leverage your WPF, Silverlight, and Windows Phone knowledge to build modern applications for Windows 8. Studio for WinRT XAML controls share the same codebase as our other XAML studios so they have similar feature sets and APIs. Reuse your XAML code; save development time. Consistent Windows 8 Themes Consistent Windows 8 Themes Studio for WinRT XAML supports the Modern UI design and interaction guidelines specified by Microsoft. By default, each control supports a consistent Windows Store theme and can inherit the dark or light theme set by the user. Deliver uniform apps across devices with confidence.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值