在我在vs2008中使用 qedit.h 时候 出现了 无法打开包括文件: dxtrans.h 这个问题, 该问题是 使用 新的windows sdk 中带的 DirectShow 包时,包中不会再带有 dxtrans.h
解决方法方法1
Remove anything to do with "dxtrans.h" and "IDXEffect" .
Say, for file "qedit.h"
//#include "dxtrans.h" -- Line 498
// IDxtCompositor //: public IDXEffect -- Line 837
// IDxtAlphaSetter //: public IDXEffect -- Line 1151
// IDxtJpeg //: public IDXEffect -- Line 1345
// IDxtKey //: public IDXEffect -- Line 1735
Now, everything compiles and works fine.
方法2
在qedit.h中注释掉#include "dxstrans.h"
在每个include<qedit.h>前加入以下的#define代码:
#define
__IDxtCompositor_INTERFACE_DEFINED__
#define
__IDxtAlphaSetter_INTERFACE_DEFINED__
#define
__IDxtJpeg_INTERFACE_DEFINED__
#define
__IDxtKey_INTERFACE_DEFINED__
#include<qedit.h>
还有 由于机子上 装了 vs2005 又装了 windows sdk 6.1 开发包 的话 出现了 Can't include afxsock.h if WINVER 0x400
解决该问题的方法
You have it already working I guess :-), looking at the date of this topic.
But for the others searching for the solution.
By default only Windows XP still compiles...
You have to help it a little to compile for windows 2000.
Just open c:\program files\microsoft sdks\windows\v6.1\include\ws2def.h in VisualStudio.
Press Control + 'G' to bring up the 'Go to line' dialog, and type 312, to jump to line 312
Modify :
#if
(_WIN32_WINNT >= 0x0600)typedef SOCKADDR_STORAGE_LH SOCKADDR_STORAGE;
typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
#elif
(_WIN32_WINNT >= 0x0501)typedef SOCKADDR_STORAGE_XP SOCKADDR_STORAGE;
typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
#endif
Into:
#if
(_WIN32_WINNT >= 0x0600)typedef SOCKADDR_STORAGE_LH SOCKADDR_STORAGE;
typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
#elif
(_WIN32_WINNT >= 0x0500) // Windows 2000 also pleasetypedef SOCKADDR_STORAGE_XP SOCKADDR_STORAGE;
typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
#endif
And line 406 from:
#if
(_WIN32_WINNT >= 0x0501)IPPROTO_IPV6 = 41, // IPv6 header IPPROTO_ROUTING = 43, // IPv6 Routing header IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header IPPROTO_ESP = 50, // encapsulating security payload IPPROTO_AH = 51, // authentication header IPPROTO_ICMPV6 = 58, // ICMPv6 IPPROTO_NONE = 59, // IPv6 no next header IPPROTO_DSTOPTS = 60, // IPv6 Destination options#endif
//(_WIN32_WINNT >= 0x0501)to:
#if
(_WIN32_WINNT >= 0x0500) // Windows 2000IPPROTO_IPV6 = 41, // IPv6 header IPPROTO_ROUTING = 43, // IPv6 Routing header IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header IPPROTO_ESP = 50, // encapsulating security payload IPPROTO_AH = 51, // authentication header IPPROTO_ICMPV6 = 58, // ICMPv6 IPPROTO_NONE = 59, // IPv6 no next header IPPROTO_DSTOPTS = 60, // IPv6 Destination options#endif
//(_WIN32_WINNT >= 0x0500)It seems to work OK :-)
引用地址 http://social.microsoft.com/Forums/zh-CN/vcgeneral/thread/4ef2b9f5-f0a3-4dce-b9c8-001e49f5c3ca