none
Compilation error Windows 7 SDK Beta SP1 - objidl.h

    Question

  • system info
    Windows 7 Beta build 7000 x64 English
    Windows 7 Beta SDK SP1
    Visual Studio 2008 Pro SP1


    The following code causes several compilation errors due to undefined qualifiers
    1#include <Windows.h> 
    2 
    3int main() 
    4
    5    return 0; 
    6

    With compilation errors :
    1>c:\program files\microsoft sdks\windows\v7.0\include\objidl.h(11266) : error C2061: syntax error : identifier '__RPC__out_xcount_part' 
    1>c:\program files\microsoft sdks\windows\v7.0\include\objidl.h(11267) : error C2059: syntax error : ')' 
    1>c:\program files\microsoft sdks\windows\v7.0\include\objidl.h(11267) : fatal error C1903: unable to recover from previous error(s); stopping compilation 

    occuring on lines
    1        virtual HRESULT STDMETHODCALLTYPE Finish_Pull(  
    2            /* [length_is][size_is][out] */ __RPC__out_xcount_part(cRequest, *pcReturned) BYTE *buf, 
    3            /* [out] */ __RPC__out ULONG *pcReturned) = 0; 



    Monday, January 19, 2009 7:18 PM

Answers

  • IDid you install the DirectX SDK?  If the DirectX SDK was installed after the Windows SDK, the DirectX \include directory will come before the Windows SDK \include directory in your PATH.  This means that Visual Studio will be build with the version of objidl.h that ships in the DirectX SDK.  You must build with the version of objidl.h that ships in the Windows 7 SDK.

     

    Please look at your VC++ Directory Settings in VS and see if the Windows SDK include path (C:\Program Files\Microsoft SDKs\Windows\v7.0\Include) is at the top of the list.  This will make Visual Studio use the SDK resources first.  You should also change the settings for the Executable and Library directories, so that the Windows SDK directories are at the top.

     

    To change the directories, in Visual Studio IDE, go to Tools, Options, Projects and Solutions, VC++ Directories.

     

    --Karin

     

     

    ||Karin Meier||Windows SDK PM||Samples.Community|| http://blogs.msdn.com/KarinM ||


    Karin Meier
    • Proposed as answer by Karin Meier Wednesday, January 21, 2009 5:53 AM
    • Marked as answer by Josh_Jackson Wednesday, January 21, 2009 12:38 PM
    Wednesday, January 21, 2009 5:53 AM

All replies

    • Proposed as answer by Karin Meier Wednesday, January 21, 2009 5:51 AM
    • Unproposed as answer by Karin Meier Wednesday, January 21, 2009 5:52 AM
    Monday, January 19, 2009 7:41 PM
  • IDid you install the DirectX SDK?  If the DirectX SDK was installed after the Windows SDK, the DirectX \include directory will come before the Windows SDK \include directory in your PATH.  This means that Visual Studio will be build with the version of objidl.h that ships in the DirectX SDK.  You must build with the version of objidl.h that ships in the Windows 7 SDK.

     

    Please look at your VC++ Directory Settings in VS and see if the Windows SDK include path (C:\Program Files\Microsoft SDKs\Windows\v7.0\Include) is at the top of the list.  This will make Visual Studio use the SDK resources first.  You should also change the settings for the Executable and Library directories, so that the Windows SDK directories are at the top.

     

    To change the directories, in Visual Studio IDE, go to Tools, Options, Projects and Solutions, VC++ Directories.

     

    --Karin

     

     

    ||Karin Meier||Windows SDK PM||Samples.Community|| http://blogs.msdn.com/KarinM ||


    Karin Meier
    • Proposed as answer by Karin Meier Wednesday, January 21, 2009 5:53 AM
    • Marked as answer by Josh_Jackson Wednesday, January 21, 2009 12:38 PM
    Wednesday, January 21, 2009 5:53 AM
  • So strong ! I start to study games development for a while. I am a new learner of programming,thanks a lot for you answer.

    Friday, February 11, 2011 3:20 PM