Error1: error C2146: syntax error : missing ';' before identifier 'PVOID64'
Cause: POINTER_64是一个宏,在64位编译下起作用,它包含在SDK目录下的BASETSD.H中(Microsoft Visual Studio 8/VC/PlatformSDK/Include/basetsd.h(23):#define POINTER_64 __ptr64),但DXSDK自己也带了一个basetsd.h,里面没有定义POINTER_64,从而导致出错。
Solution1:
Projects and Solutions -> VC++ Directories -> Include Files里确保系统包含目录(以S打头的)在最前面,同时在 project properties下面的“C/C++ -> General”中确保“Additional Include Directories”为空(因为它会被优先编译,这样就轮不到VC/PlatformSDK/Include/basetsd.h),所有的包含目录都应该在上面的include里面。这种方法不用改代码。
Solution2:
在DXSDK自己的basetsd.h里自己定义#define POINTER_64 __ptr64
Trackback:http://hi.baidu.com/maxgoto/blog/item/fc40a86e8ec1f3da81cb4aff.html
Solution3(bad):
#define POINTER_64 __ptr64
typedef void *PVOID; typedef void *POINTER_64 PVOID64;
Error2: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Solution:
// operator=(LONG);
COARefTime&operator=(LONG);
Error3: 1>./outputq.cpp(664) : error C2065: 'iDone' : undeclared identifier
Solution:
long iDone;
for (iDone = 0; ....)
Error4:
1>./winutil.cpp(2104) : error C2065: 'Count' : undeclared identifier
1>./winutil.cpp(2106) : error C2228: left of '.peRed' must have class/struct/union
Solution:
UINT Count; // sw 2009.1.27
for (Count = 0;Count < Result;Count++) {
Error5:
1>./wxdebug.cpp(567) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
solution:
Note: When using DXSDK in your applicaiton, remeber to adjust the postion of include files,make sure platformSDK/Include piors to DXSDK/Include.
VS2005下编译DirectShow的example时遇到的问题
error LNK2001: unresolved external symbol "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA)
solution: add atls.lib or atlsd.lib to the project.
LINK : fatal error LNK1104: cannot open file 'libci.lib'
solution: ignore libcp.lib, libc.lib, and libci.lib
LINK : fatal error LNK1104: cannot open file 'largeint.lib'
Solution: remove 'largeintlib'
cannot open file '../../common/wmstub.lib'
solution: must instuall Windows Media Format SDK 7.1.1, or just remove it (if the compiling can be successful)