Windows sdk 8.0及更高版本中缺少D2D1_PIXEL_FORMAT定义... [英] D2D1_PIXEL_FORMAT definition is missing in windows sdk 8.0 and above ...

查看:258
本文介绍了Windows sdk 8.0及更高版本中缺少D2D1_PIXEL_FORMAT定义...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。

我发现在Windows sdk 7中文件d2d1.h中的D2D1_PIXEL_FORMAT的定义现在在8.0和8.1中消失。

I found that the definition of D2D1_PIXEL_FORMAT which was in file d2d1.h at windows sdk 7,is now disappear in 8.0 and 8.1.

因此,在使用wincodec.h编译带下划线的行时出错:

therefor, I get error when compiling with wincodec.h for line with underline:

#if(_WIN32_WINNT> = _WIN32_WINNT_WIN8)||已定义(_WIN7_PLATFORM_UPDATE)

typedef / * [public] * / struct WICImageParameters

    {

D2D1_PIXEL_FORMAT PixelFormat;

    FLOAT DpiX;

    FLOAT DpiY; 

#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
typedef /* [public] */ struct WICImageParameters
    {
D2D1_PIXEL_FORMAT PixelFormat;
    FLOAT DpiX;
    FLOAT DpiY; 

错误 1
错误C2146:语法错误:在标识符'PixelFormat'之前缺少';'
c:\program files(x86)\ windows kits\8.1\include\\\\wincodec.h
...

Error 1 error C2146: syntax error : missing ';' before identifier 'PixelFormat' c:\program files (x86)\windows kits\8.1\include\um\wincodec.h ...

那么我做错了什么?

谢谢

Yossi




推荐答案

WIC标头获取了Windows 7.x SDK中没有的一些Direct2D依赖项。我之前有一些关于这个问题的报道,但是我不相信这个问题只需花费
DirectXTex 我们已经设法在内部获得了一个repro,因为任何标题组合都会导致此问题。

The WIC header picked up some Direct2D dependencies which were not there in the Windows 7.x SDK. I've had some reports of this issue before with DirectXTex, although I don't believe we've managed to get a repro internally for whatever combination of headers results in this problem.

您可以通过包含< d2d1.h>来轻松修复它。在包含< wincodec.h>。

You can fix it pretty easily by including <d2d1.h> before you include <wincodec.h>.


这篇关于Windows sdk 8.0及更高版本中缺少D2D1_PIXEL_FORMAT定义...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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