locked
SDK won't compile on VS2003 -> Syntax error in D3D10.h RRS feed

  • Question

  • When I try to compile the code from Tutorial 01 that comes with the October SDK in VS2003 it gives the following errors;

    i:\Program Files\Microsoft DirectX SDK\Include\D3D10.h(818): error C2061: syntax error : identifier '__out'
    i:\Program Files\Microsoft DirectX SDK\Include\D3D10.h(822): error C2061: syntax error : identifier '__in'
    i:\Program Files\Microsoft DirectX SDK\Include\D3D10.h(826): error C2059: syntax error : ')'


    What do I need to do to resolve this problem? Thanks.
    Saturday, October 21, 2006 6:41 PM

Answers

  • Even if you get the compiler working, you cannot execute DX10-linked libraries under Windows XP.  DX10 libraries require Windows Vista, and at this time, specifically RC1.
    Sunday, October 22, 2006 3:45 PM
  • To compile under Visual Studio.NET 2003, do the following:

    //WTF?!?  Seriously...  d3d10.h uses these, but it doesnt define them anywhere.  Are they newly autodefined in VS.NET 2005?
    #define __out /**/
    #define __in /**/
    #define __inout /**/

    #define __in_opt /**/
    #define __out_opt /**/
    #define __inout_opt /**/

    #define __in_ecount(THING) /**/
    #define __in_ecount_opt(THING) /**/
    #define __out_ecount(THING) /**/
    #define __out_ecount_opt(THING) /**/
    #define __inout_ecount(THING) /**/
    #define __inout_ecount_opt(THING) /**/

    #define __in_bcount_opt(THING) /**/
    #define __out_bcount_opt(THING) /**/
    #define __inout_bcount_opt(THING) /**/

    #include <d3d10.h>

    It works great for me. :)   As others have said, you will not be able to get a D3D10 device / find the .dll on WindowsXP, only Vista... but that doesnt stop you from programming under XP!!
    Friday, October 27, 2006 4:59 PM

All replies

  • I haven’t try it with VS 2003 so far but the last windows SDK could help to solve this problem.

    Saturday, October 21, 2006 7:42 PM
  • I think the October SDK is the latest version?
    Saturday, October 21, 2006 8:39 PM
  • I don’t mean the DirectX SDK. I talk about the Windows SDK.

    Anyway you should know that Visual Studio 2003 is on the list of applications that are not supported on Windows Vista. Maybe you should try Visual C++ 2005 Express Edition for your Direct3D 10 experiments.

    Sunday, October 22, 2006 8:24 AM
  • I am still using WinXP at the moment, but thank's for the suggestion.

    I didn't realise there WAS a windows SDK, I have not been doing c++ programming for long (mostly programmed in Java and Perl up to now), so I will certainly install the SDK and see if that fixes it. Thanks again.
    Sunday, October 22, 2006 9:58 AM
  • Even if you get the compiler working, you cannot execute DX10-linked libraries under Windows XP.  DX10 libraries require Windows Vista, and at this time, specifically RC1.
    Sunday, October 22, 2006 3:45 PM
  • D'oh... don't know why I didn't realise that :P I knew DX10 was for Vista only, I just assumed it would be backwards compatible with DX9... well I guess I should download DX9 SDK instead then :P Thanks anyway :)
    Sunday, October 22, 2006 10:59 PM
  • The October SDK still contains anything you need for Direct3D 9.

    Monday, October 23, 2006 6:15 AM
  • To compile under Visual Studio.NET 2003, do the following:

    //WTF?!?  Seriously...  d3d10.h uses these, but it doesnt define them anywhere.  Are they newly autodefined in VS.NET 2005?
    #define __out /**/
    #define __in /**/
    #define __inout /**/

    #define __in_opt /**/
    #define __out_opt /**/
    #define __inout_opt /**/

    #define __in_ecount(THING) /**/
    #define __in_ecount_opt(THING) /**/
    #define __out_ecount(THING) /**/
    #define __out_ecount_opt(THING) /**/
    #define __inout_ecount(THING) /**/
    #define __inout_ecount_opt(THING) /**/

    #define __in_bcount_opt(THING) /**/
    #define __out_bcount_opt(THING) /**/
    #define __inout_bcount_opt(THING) /**/

    #include <d3d10.h>

    It works great for me. :)   As others have said, you will not be able to get a D3D10 device / find the .dll on WindowsXP, only Vista... but that doesnt stop you from programming under XP!!
    Friday, October 27, 2006 4:59 PM
  • Thank's for all the responses, got it compiling properly now.
    Sunday, October 29, 2006 2:22 PM