微软 DirectShow 的自摆乌龙

    技术2022-05-20  43

    微软 DirectShow 的自摆乌龙

    在使用有关 DirectShow 东西的时候,使用了头文件

    #include <qedit.h>

    结果,编译的时候提示如下错误:

    错误 1 fatal error C1083: 无法打开包括文件:"dxtrans.h": No such file or directory c:/program files/microsoft sdks/windows/v6.0a/include/qedit.h 498

    这个真是奇怪了,为啥微软自己 SDK 里的东西,都会出现找不到头文件的问题呢?

    解决办法可以有两种:

    (1) 从其它地方把 dxtrans.h 这个文件拷过来,例如从

    Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i/dxtrans.hProgram Files/Windows Mobile 5.0 SDK R2/Smartphone/Include/Armv4i/dxtrans.hD:/Program Files/Windows Mobile 6 SDK/PocketPC/Include/Armv4iD:/Program Files/Windows Mobile 6 SDK/Smartphone/Include/Armv4i

    里拷 dxtrans.h 这个文件出来。

    (2) 或者在引用 qedit.h 头文件的时候,加上这么几句:

    #pragma include_alias( "dxtrans.h", "qedit.h" )#define __IDxtCompositor_INTERFACE_DEFINED__#define __IDxtAlphaSetter_INTERFACE_DEFINED__#define __IDxtJpeg_INTERFACE_DEFINED__#define __IDxtKey_INTERFACE_DEFINED__#include "Qedit.h"

    也可以。

    微软的MSDN上还有对这个问题的讨论,看来真是微软自摆乌龙了。


    最新回复(0)