Current version

v1.10.4 (stable)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Contact info
 
Other projects
   Altirra

Archives

Blog Archive

Conflict between VS2010 beta 2 and old DirectX SDKs

I've just started evaluating Visual Studio 2010 beta 2, and pretty quickly ran into this problem:

------ Build started: Project: system, Configuration: Debug Win32 ------
  Error.cpp
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h(11280): error C2061: syntax error : identifier '__RPC__out_xcount_part'
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h(11281): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h(11281): fatal error C1903: unable to recover from previous error(s); stopping compilation

Turning on /showIncludes reveals the cause. It turns out that this is caused by a conflict between older versions of the DirectX SDK and the Windows 7 SDK that ships with VS2010 beta 2. Unfortunately, Microsoft put rpcsal.h into both SDKs, which causes disaster:

Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\vfw.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mmsystem.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack1.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\poppack.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mmreg.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\pshpack1.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\poppack.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ole2.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpc.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcdce.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcdcep.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcnsi.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcnterr.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcasync.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcndr.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcnsip.h
Note: including file: I:\dx9sdk2\include\rpcsal.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\poppack.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\wtypes.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\guiddef.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\unknwn.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h

Switching to a newer version of the DirectX SDK fixes the problem.

Comments

This blog was originally open for comments when this entry was first posted, but was later closed and then removed due to spam and after a migration away from the original blog software. Unfortunately, it would have been a lot of work to reformat the comments to republish them. The author thanks everyone who posted comments and added to the discussion.