Win2D在C ++ / WinRT中是否可用? [英] Is Win2D yet available in C++/WinRT?

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

问题描述

我需要在cppwinrt项目中使用win2D。我尝试使用Win2D样本文件作为模型来模拟其设置,将来自该项目的win2d软件包文件放入其中,重复了自定义构建步骤,但我无法对其进行编译。我记得有一些关于Win2D即将被添加到标准cppwinrt标头中的说法,以便可以像其他出色的cppwinrt接口一样对其进行访问。这会很快发生吗?还是没有人有一些在当前Visual Studio 2017环境中使用Win2D的真正特定说明?我正在使用Insider预览程序,但还没有看到任何提示。谢谢。

I need to use win2D in my cppwinrt project. Using the Win2D sample file as a model I’ve tried to mimic its setup, putting in the package file for win2d from that project, duplicating the custom build step, but I can’t get it to compile. I remember some talk about Win2D being added soon to the standard cppwinrt headers so that it could be accessed like others of these wonderful cppwinrt interfaces. Is this something that might happen soon? Or does anyone have some really specific instructions for using Win2D in the current Visual Studio 2017 environment? I’m in the Insider preview program but haven’t seen anything come up. Thanks.

推荐答案

一旦您拥有下载了Win2D ,并假设您安装了最新的RS4 Windows SDK,则可以简单地使用cppwinrt生成Win2D标头以供使用:

Once you have downloaded Win2D and assuming you have the latest RS4 Windows SDK installed, you can simply use cppwinrt to generate the Win2D headers for consumption:

cppwinrt -in lib\uap10.0\Microsoft.Graphics.Canvas.winmd -ref sdk

这将生成一个winrt文件夹,其中包含您需要包含的标题才能使用Win2D。然后,您需要将父文件夹添加到包含路径,并确保Win2D DLL复制到您的包或生成输出文件夹中。

This will generate a winrt folder that contains the headers that you need to include in order to use Win2D. You will then need to add the parent folder to your include paths and ensure that the Win2D DLL is copied to your package or build output folder.

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

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