Problem description: The project was written in vs2008 before, and later when recompiling it on vs2010, I found the following error:
1>------ Started Generation: Project: Test, Configuration: Debug Win32 ------
1>
1>c:/program files/microsoft sdks/windows/v7.0a/include/(11280): error C2061: Syntax error:Identifier“__RPC__out_xcount_part”
1>c:/program files/microsoft sdks/windows/v7.0a/include/(11281): error C2059: Syntax error: ")"
1>c:/program files/microsoft sdks/windows/v7.0a/include/(11281): fatal error C1903: Cannot recover from previous error; compilation is being stopped
========== Generate: 0 successful, 1 failed, the latest 0, 0 skipped ============
Solution process:
I have searched for many solutions online, roughly the following:
Method 1:
Put the Windows SDK inclusion directory first!
Operation: Right-click on the project -> Properties -> Configure properties -> VC + + directory, modify the "Include directory", and put $(WindowsSdkDir) include first. Recompile. The problem was solved.
Method 2:
Solution:
Add the following precompiled instructions in the DX directory:
#define __RPC__out_xcount_part(size, length)
#define __RPC__in_xcount(size)
#define __RPC__in_xcount_full(size)
#define __RPC__in_range(min, max)
#define __RPC__inout_xcount(size)
Method 3:
Delete the DX directory. The problem has been resolved.